Skip to content

Commit 44bc882

Browse files
chore: Update release assets
1 parent 72e707f commit 44bc882

2 files changed

Lines changed: 22 additions & 28 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ on:
55
tags: ["v*"]
66

77
# Release assets are published only after all supported platforms produce a
8-
# minisign-signed updater package. This detached updater signature is separate
9-
# from macOS code signing. It is safe to rerun a failed release: uploads replace
10-
# an existing asset with the same name.
8+
# minisign-signed updater package. The signature is embedded in latest.json and
9+
# is separate from macOS code signing. It is safe to rerun a failed release:
10+
# uploads replace an existing asset with the same name.
1111
permissions:
1212
contents: write
1313

@@ -29,13 +29,6 @@ jobs:
2929
fail-fast: false
3030
matrix:
3131
include:
32-
- os: macos-26-intel
33-
formats: app,dmg
34-
platform: macos-x86_64
35-
updater_format: app
36-
updater_glob: '*.app.tar.gz'
37-
updater_asset: Siffra-macos-x86_64.app.tar.gz
38-
installer_glob: '*.dmg'
3932
- os: macos-15
4033
formats: app,dmg
4134
platform: macos-aarch64
@@ -124,18 +117,20 @@ jobs:
124117
test -n "$updater"
125118
test -n "$installer"
126119
test -f "$updater.sig"
127-
test -f "$installer.sig"
128120
cp "$updater" "release/${{ matrix.updater_asset }}"
129-
cp "$updater.sig" "release/${{ matrix.updater_asset }}.sig"
130121
cp "$installer" "release/$(basename "$installer")"
131-
cp "$installer.sig" "release/$(basename "$installer").sig"
132-
printf '{"platform":"%s","asset":"%s","format":"%s"}\n' \
133-
'${{ matrix.platform }}' '${{ matrix.updater_asset }}' '${{ matrix.updater_format }}' \
122+
signature="$(<"$updater.sig")"
123+
jq -n \
124+
--arg platform '${{ matrix.platform }}' \
125+
--arg asset '${{ matrix.updater_asset }}' \
126+
--arg format '${{ matrix.updater_format }}' \
127+
--arg signature "$signature" \
128+
'{platform: $platform, asset: $asset, format: $format, signature: $signature}' \
134129
> release/updater.json
135130
136131
# Keep the artifact contract narrow: one updater package, one native
137-
# installer, their detached signatures, and internal manifest data.
138-
test "$(find release -maxdepth 1 -type f | wc -l | tr -d ' ')" -eq 5
132+
# installer, and internal manifest data containing the signature.
133+
test "$(find release -maxdepth 1 -type f | wc -l | tr -d ' ')" -eq 3
139134
140135
- uses: actions/upload-artifact@v4
141136
with:
@@ -187,18 +182,18 @@ jobs:
187182
while IFS= read -r -d '' asset; do
188183
assets+=("$asset")
189184
done < <(find release-assets -type f \( \
190-
-name '*.AppImage' -o -name '*.AppImage.sig' -o \
191-
-name '*.app.tar.gz' -o -name '*.app.tar.gz.sig' -o \
192-
-name '*-setup.exe' -o -name '*-setup.exe.sig' -o \
193-
-name '*.dmg' -o -name '*.dmg.sig' -o \
194-
-name '*.msi' -o -name '*.msi.sig' -o \
195-
-name '*.deb' -o -name '*.deb.sig' -o \
185+
-name '*.AppImage' -o \
186+
-name '*.app.tar.gz' -o \
187+
-name '*-setup.exe' -o \
188+
-name '*.dmg' -o \
189+
-name '*.msi' -o \
190+
-name '*.deb' -o \
196191
-name latest.json \
197192
\) -print0)
198193
199-
# Four platforms contribute four public artifacts each, followed by
194+
# Three platforms contribute two public artifacts each, followed by
200195
# the updater manifest. Refuse to publish anything else.
201-
test "${#assets[@]}" -eq 17
196+
test "${#assets[@]}" -eq 7
202197
for asset in "${assets[@]}"; do
203198
gh release upload "$GITHUB_REF_NAME" "$asset" --clobber
204199
done

‎scripts/create-update-manifest.sh‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,16 @@ while IFS= read -r -d '' metadata; do
1616
platform="$(jq -er '.platform' "$metadata")"
1717
asset="$(jq -er '.asset' "$metadata")"
1818
format="$(jq -er '.format' "$metadata")"
19+
signature="$(jq -er '.signature' "$metadata")"
1920
package="$asset_dir/$asset"
20-
signature="$package.sig"
2121

2222
test -f "$package"
23-
test -f "$signature"
2423

2524
url="https://github.com/ImpossibleReality/Siffra/releases/download/$tag/$asset"
2625
platforms="$(jq \
2726
--arg platform "$platform" \
2827
--arg url "$url" \
29-
--arg signature "$(<"$signature")" \
28+
--arg signature "$signature" \
3029
--arg format "$format" \
3130
'. + {($platform): {url: $url, signature: $signature, format: $format}}' \
3231
<<<"$platforms")"

0 commit comments

Comments
 (0)