Skip to content

Commit 4d19a59

Browse files
wesbillmanPinky
andauthored
fix(release): use signed NSIS installer for updates (#1036)
Signed-off-by: Wes <[email protected]> Co-authored-by: Pinky <44b8e82baa6e0e254e0208d68f335c283c94e7b78dd1fa10d5a49d3f13dd0435@sprout-oss.stage.blox.sqprod.co>
1 parent fa1cade commit 4d19a59

1 file changed

Lines changed: 15 additions & 12 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -664,23 +664,26 @@ jobs:
664664
exit 1
665665
fi
666666
667-
# Rename with _alpha-unsigned marker
667+
# Tauri 2.x with createUpdaterArtifacts: true signs the NSIS
668+
# installer in place (<name>-setup.exe + <name>-setup.exe.sig).
669+
SIG="${EXE}.sig"
670+
if [[ ! -f "$SIG" ]]; then
671+
echo "::error::NSIS installer signature not found: $SIG"
672+
exit 1
673+
fi
674+
675+
# Rename with _alpha-unsigned marker, keeping the detached signature
676+
# in lockstep so latest.json matches the uploaded updater artifact.
668677
EXE_DIR=$(dirname "$EXE")
669678
EXE_BASE=$(basename "$EXE" .exe)
670679
MARKED_EXE="${EXE_DIR}/${EXE_BASE}_alpha-unsigned.exe"
680+
MARKED_SIG="${MARKED_EXE}.sig"
671681
mv "$EXE" "$MARKED_EXE"
682+
mv "$SIG" "$MARKED_SIG"
672683
echo "exe=$MARKED_EXE" >> "$GITHUB_OUTPUT"
673-
674-
# Find the updater .nsis.zip and .sig
675-
ARCHIVE=$(find "$BUNDLE_DIR/nsis" -name '*.nsis.zip' ! -name '*.sig' -type f | head -1)
676-
SIG="${ARCHIVE}.sig"
677-
if [[ -z "$ARCHIVE" || ! -f "$SIG" ]]; then
678-
echo "::error::NSIS updater archive or signature not found in $BUNDLE_DIR/nsis"
679-
exit 1
680-
fi
681-
echo "archive=$ARCHIVE" >> "$GITHUB_OUTPUT"
682-
echo "archive_name=$(basename "$ARCHIVE")" >> "$GITHUB_OUTPUT"
683-
echo "sig=$SIG" >> "$GITHUB_OUTPUT"
684+
echo "archive=$MARKED_EXE" >> "$GITHUB_OUTPUT"
685+
echo "archive_name=$(basename "$MARKED_EXE")" >> "$GITHUB_OUTPUT"
686+
echo "sig=$MARKED_SIG" >> "$GITHUB_OUTPUT"
684687
685688
- name: Read updater signature
686689
id: read-sig

0 commit comments

Comments
 (0)