Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,16 @@ jobs:
- name: Create zip archive
run: zip -r TermQ-${{ steps.version.outputs.VERSION }}.zip TermQ.app

- name: Sign zip for Sparkle
env:
SPARKLE_PRIVATE_KEY: ${{ secrets.SPARKLE_PRIVATE_KEY }}
run: |
SIGN_UPDATE=".build/artifacts/sparkle/Sparkle/bin/sign_update"
ZIP="TermQ-${{ steps.version.outputs.VERSION }}.zip"
SIG=$(echo "$SPARKLE_PRIVATE_KEY" | "$SIGN_UPDATE" --ed-key-file - -p "$ZIP")
echo "$SIG" > "${ZIP}.sig"
echo "✅ EdDSA signature: $SIG"

- name: Generate checksums
run: |
shasum -a 256 TermQ-${{ steps.version.outputs.VERSION }}.dmg > checksums.txt
Expand All @@ -324,6 +334,7 @@ jobs:
files: |
TermQ-${{ steps.version.outputs.VERSION }}.dmg
TermQ-${{ steps.version.outputs.VERSION }}.zip
TermQ-${{ steps.version.outputs.VERSION }}.zip.sig
checksums.txt
body: |
## Installation
Expand Down
15 changes: 11 additions & 4 deletions scripts/generate-appcast.sh
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,18 @@ generate_appcast() {
continue
fi

# Signature would be read from a signatures file if available
# Fetch EdDSA signature from the .zip.sig release asset
local signature=""
local sig_file="${OUTPUT_DIR}/signatures/${tag}.sig"
if [[ -f "$sig_file" ]]; then
signature=$(cat "$sig_file")
local sig_url
sig_url=$(echo "$release" | jq -r '[.assets[] | select(.name | endswith(".zip.sig"))][0].browser_download_url // empty')
if [[ -n "$sig_url" && "$sig_url" != "null" ]]; then
signature=$(curl -sS "$sig_url" 2>/dev/null | tr -d '[:space:]')
if [[ -n "$signature" ]]; then
log_info "Found EdDSA signature for $tag"
fi
fi
if [[ -z "$signature" ]]; then
log_warn "No EdDSA signature found for $tag — Sparkle update validation will fail"
fi

items+=$(generate_item "$tag" "$title" "$pub_date" "$body" "$download_url" "$file_size" "$signature")
Expand Down
Loading