Skip to content

Commit 63aad07

Browse files
committed
fix(release): fall back when minisign apt package is unavailable
1 parent 03a0177 commit 63aad07

3 files changed

Lines changed: 18 additions & 1 deletion

File tree

.github/workflows/desktop-package.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,9 @@ jobs:
324324
--repo "GCWing/BitFun" \
325325
--out linux-release-assets/linux-binaries.json
326326
327+
- name: Setup Rust toolchain (minisign fallback)
328+
uses: dtolnay/rust-toolchain@stable
329+
327330
# The Tauri bundler signs the five updater artifacts during `tauri build`,
328331
# but the installers people download by hand from the release page — dmg,
329332
# deb, rpm, the Windows installer and the direct AppImages — shipped with

.github/workflows/nightly.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,9 @@ jobs:
279279
--repo "GCWing/BitFun" \
280280
--out linux-release-assets/linux-binaries.json
281281
282+
- name: Setup Rust toolchain (minisign fallback)
283+
uses: dtolnay/rust-toolchain@stable
284+
282285
# The Tauri bundler signs the five updater artifacts during `tauri build`,
283286
# but the installers people download by hand from the release page — dmg,
284287
# deb, rpm, the Windows installer and the direct AppImages — shipped with

scripts/sign-release-assets.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,18 @@ fi
3434

3535
if ! command -v minisign >/dev/null 2>&1; then
3636
echo "[sign] Installing minisign..."
37-
sudo apt-get install -y --no-install-recommends minisign >/dev/null
37+
# Ubuntu's package is not available in the default repositories on every
38+
# runner image (notably ubuntu-24.04-arm). Prefer it when present, then use
39+
# the portable Rust distribution as a fallback.
40+
if ! sudo apt-get install -y --no-install-recommends minisign >/dev/null 2>&1; then
41+
if ! command -v cargo >/dev/null 2>&1; then
42+
echo "[sign] ERROR: minisign is unavailable and cargo is not installed." >&2
43+
exit 1
44+
fi
45+
MINISIGN_ROOT="${RUNNER_TEMP:-${TMPDIR:-/tmp}}/bitfun-minisign"
46+
cargo install --registry crates-io --locked --root "$MINISIGN_ROOT" minisign >/dev/null
47+
export PATH="$MINISIGN_ROOT/bin:$PATH"
48+
fi
3849
fi
3950

4051
WORK="$(mktemp -d)"

0 commit comments

Comments
 (0)