Skip to content

Commit 27f5e3b

Browse files
committed
fix: regenerate Tauri updater signatures after SignPath code signing (#89)
The Tauri updater signatures were being generated during the initial build, before SignPath applied Authenticode code signing. Since Authenticode modifies the executable files, the original signatures no longer matched, causing "signature verification failed" errors on Windows. Changes: - Remove premature signature upload from Windows build jobs (x64/ARM64) - Add regenerate-updater-signatures job that runs after SignPath - Update job dependencies to wait for signature regeneration This ensures Tauri updater signatures are generated from the already-signed executables, fixing the verification issue on Windows.
1 parent a507c5d commit 27f5e3b

File tree

1 file changed

+84
-34
lines changed

1 file changed

+84
-34
lines changed

.github/workflows/maintenance-release.yml

Lines changed: 84 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -490,22 +490,6 @@ jobs:
490490
path: |
491491
src-tauri/target/x86_64-pc-windows-msvc/release/bundle/msi/*.msi
492492
src-tauri/target/x86_64-pc-windows-msvc/release/bundle/nsis/*.exe
493-
494-
# Upload Tauri updater signatures directly (not for Windows code signing)
495-
- name: Upload Tauri updater signatures to GitHub Release
496-
uses: ncipollo/release-action@v1
497-
with:
498-
tag: ${{ needs.create-release.outputs.release_tag }}
499-
name: "Armbian Imager ${{ needs.create-release.outputs.release_tag }}"
500-
draft: true
501-
prerelease: false
502-
allowUpdates: true
503-
omitBodyDuringUpdate: true
504-
omitNameDuringUpdate: true
505-
replacesArtifacts: false
506-
artifacts: |
507-
src-tauri/target/x86_64-pc-windows-msvc/release/bundle/nsis/*.exe.sig
508-
509493
outputs:
510494
artifact-id: ${{ steps.upload-unsigned.outputs.artifact-id }}
511495

@@ -591,22 +575,6 @@ jobs:
591575
path: |
592576
src-tauri/target/aarch64-pc-windows-msvc/release/bundle/msi/*.msi
593577
src-tauri/target/aarch64-pc-windows-msvc/release/bundle/nsis/*.exe
594-
595-
# Upload Tauri updater signatures directly (not for Windows code signing)
596-
- name: Upload Tauri updater signatures to GitHub Release
597-
uses: ncipollo/release-action@v1
598-
with:
599-
tag: ${{ needs.create-release.outputs.release_tag }}
600-
name: "Armbian Imager ${{ needs.create-release.outputs.release_tag }}"
601-
draft: true
602-
prerelease: false
603-
allowUpdates: true
604-
omitBodyDuringUpdate: true
605-
omitNameDuringUpdate: true
606-
replacesArtifacts: false
607-
artifacts: |
608-
src-tauri/target/aarch64-pc-windows-msvc/release/bundle/nsis/*.exe.sig
609-
610578
outputs:
611579
artifact-id: ${{ steps.upload-unsigned.outputs.artifact-id }}
612580

@@ -685,13 +653,95 @@ jobs:
685653
signed-arm64/**/*.msi
686654
signed-arm64/**/*.exe
687655
656+
# Upload signed artifacts for signature regeneration job
657+
- name: Upload signed x64 artifacts
658+
if: needs.build-windows-x64.result == 'success'
659+
uses: actions/upload-artifact@v4
660+
with:
661+
name: signed-x64
662+
path: signed-x64/
663+
retention-days: 1
664+
665+
- name: Upload signed ARM64 artifacts
666+
if: needs.build-windows-arm64.result == 'success'
667+
uses: actions/upload-artifact@v4
668+
with:
669+
name: signed-arm64
670+
path: signed-arm64/
671+
retention-days: 1
672+
673+
regenerate-updater-signatures:
674+
name: Regenerate updater signatures after code signing
675+
needs:
676+
- create-release
677+
- sign-windows
678+
if: |
679+
always() &&
680+
needs.sign-windows.result == 'success'
681+
runs-on: ubuntu-latest
682+
permissions:
683+
contents: write
684+
actions: read
685+
steps:
686+
- uses: actions/checkout@v4
687+
688+
- name: Setup Rust
689+
uses: dtolnay/rust-toolchain@stable
690+
691+
- name: Download signed x64 artifacts
692+
uses: actions/download-artifact@v4
693+
with:
694+
name: signed-x64
695+
path: signed-x64
696+
697+
- name: Download signed ARM64 artifacts
698+
uses: actions/download-artifact@v4
699+
with:
700+
name: signed-arm64
701+
path: signed-arm64
702+
703+
- name: Install Tauri CLI
704+
run: cargo install tauri-cli --version "${TAURI_CLI_VERSION}" --locked
705+
706+
- name: Re-sign x64 executable
707+
env:
708+
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
709+
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
710+
run: |
711+
EXE_FILE=$(find signed-x64 -name "*.exe" -type f | head -n 1)
712+
if [[ -n "$EXE_FILE" ]]; then
713+
cargo tauri signer sign "$EXE_FILE" --installer
714+
fi
715+
716+
- name: Re-sign ARM64 executable
717+
env:
718+
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
719+
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
720+
run: |
721+
EXE_FILE=$(find signed-arm64 -name "*.exe" -type f | head -n 1)
722+
if [[ -n "$EXE_FILE" ]]; then
723+
cargo tauri signer sign "$EXE_FILE" --installer
724+
fi
725+
726+
- name: Upload updated signatures to GitHub Release
727+
uses: ncipollo/release-action@v1
728+
with:
729+
tag: ${{ needs.create-release.outputs.release_tag }}
730+
allowUpdates: true
731+
omitBodyDuringUpdate: true
732+
omitNameDuringUpdate: true
733+
replacesArtifacts: false
734+
artifacts: |
735+
signed-x64/**/*.sig
736+
signed-arm64/**/*.sig
737+
688738
generate-update-manifest:
689739
name: Generate latest.json for updater
690740
needs:
691741
- create-release
692742
- build-linux
693743
- build-macos
694-
- sign-windows
744+
- regenerate-updater-signatures
695745
if: |
696746
always() &&
697747
(startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch') &&
@@ -806,7 +856,7 @@ jobs:
806856
- create-release
807857
- build-linux
808858
- build-macos
809-
- sign-windows
859+
- regenerate-updater-signatures
810860
- generate-update-manifest
811861
if: |
812862
always() &&

0 commit comments

Comments
 (0)