ci(release): publish Tauri updater latest.json on tag releases - #1372
ci(release): publish Tauri updater latest.json on tag releases#13720xbrayo wants to merge 2 commits into
Conversation
Greptile SummaryAdds generation and publication of signed Tauri updater metadata during tag releases.
Confidence Score: 3/5This PR should not merge until tag metadata is moved out of executable shell source; the checkout action should also be pinned for release-path hardening. Any repository writer can push a matching tag, and the release job substitutes that tag directly into shell commands running in a contents-write workflow, making command execution reachable before draft release publication. Files Needing Attention: .github/workflows/release.yml
|
| Filename | Overview |
|---|---|
| .github/workflows/release.yml | Adds updater signing, artifact collection, manifest generation, and release upload, but directly embeds tag-controlled text into a privileged shell step and adds a mutable checkout dependency. |
| scripts/package/generate_latest_json.py | Builds a Tauri updater manifest from staged signature files and rejects empty manifests; no independently publishable defect was established in the configured release path. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
T["Push v* tag"] --> B["Build Tauri matrix"]
B --> S["Sign updater bundles"]
S --> P["Normalize updater artifacts"]
P --> D["Download build artifacts"]
T --> M["Interpolate tag metadata"]
M --> G["Generate latest.json"]
D --> G
G --> R["Create draft GitHub release"]
Reviews (1): Last reviewed commit: "ci(release): publish Tauri updater lates..." | Re-trigger Greptile
|
This is a prerequisite for ActivityWatch/aw-tauri#68. |
|
@TimeToBuildBob Has this been satisfactorily resolved? I don't see one in https://github.com/ActivityWatch/activitywatch/releases/tag/v0.14.0b4, should be careful to support "editions" like the "Research Edition" (not conflating release lines). |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
@ErikBjare Not resolved — and the reason you don't see one in v0.14.0b4 is that this PR is still open, unmerged (authored by @0xbrayo). So no The editions concern is legitimate and not yet addressed by the current implementation. My recommendation: keep the PR open pending (1) resolving Greptile's security feedback (tag-controlled shell interpolation in a contents-write job + unpinned checkout action), and (2) deciding the edition/endpoint partition. I'll defer to @0xbrayo on the release-line design since it's their PR. |
@TimeToBuildBob @ErikBjare Addressed both items. 1. Greptile security
2. Edition / endpoint partition Decision: partition by distinct GitHub asset names (and matching updater artifact prefixes). A given tag's release only carries that edition's manifest, so the two lines cannot overwrite each other or share an updater endpoint.
GitHub's
That's per-tag. If we later want a stable rolling URL for the research line (so
|
|
@0xbrayo's fixes look correct:
What still needs to land externally (outside this PR):
Without those the generate step intentionally fails (no @ErikBjare — from the CI/security side this is ready when those prerequisites are set up. |
Sign aw-tauri bundles with TAURI_SIGNING_PRIVATE_KEY, collect per-platform updater artifacts, and generate latest.json for the Tauri updater endpoint when publishing draft releases. URLs use github.repository so they resolve to ActivityWatch/activitywatch on upstream runs.
…nterpolation Pass tag/repo through Actions env vars instead of interpolating them into shell source, pin checkout in the contents-write release job, and emit latest.json vs latest-research.json with matching artifact prefixes so standard and Research Edition lines cannot share an updater endpoint.
95e6c19 to
112659c
Compare
|
Identical to before, dropped a merged commit for linear history. |
|
Did an independent pass over the updated branch: Verified:
One bug to fix before merge, in the "Package Tauri updater artifacts" step: ext="${base#*.}" # everything after the first dot, e.g. "app.tar.gz"This only works for macOS ( case "$base" in
*.app.tar.gz) ext="app.tar.gz" ;;
*.AppImage.tar.gz) ext="AppImage.tar.gz" ;;
*.AppImage) ext="AppImage" ;;
*.nsis.zip) ext="nsis.zip" ;;
*.msi.zip) ext="msi.zip" ;;
*.msi) ext="msi" ;;
*.exe) ext="exe" ;;
*) echo "unknown updater bundle: $base" >&2; exit 1 ;;
esacMinor: on Windows, both NSIS and MSI Also noting for the aw-tauri side (not this PR): Happy to merge once the |
|
Prerequisite update: |
Summary
Adds support for publishing a Tauri updater manifest (and signed updater artifacts) on tag releases from the unified
release.ymlworkflow.TAURI_SIGNING_PRIVATE_KEYinto the Tauri build so bundles emit.sigfiles whencreateUpdaterArtifactsis enabled in aw-tauriactivitywatch-tauri[-research]-<version>-<platform>.<ext>[.sig]scripts/package/generate_latest_json.pyduring the draft release jobStandard and Research Edition are partitioned by filename so they cannot share an updater endpoint:
latest.jsonactivitywatch-tauri-<ver>-<platform>.*https://github.com/ActivityWatch/activitywatch/releases/latest/download/latest.jsonlatest-research.jsonactivitywatch-tauri-research-<ver>-<platform>.*https://github.com/ActivityWatch/activitywatch/releases/download/<research-tag>/latest-research.jsonGitHub
/releases/latestis the latest non-prerelease (standard). Research binaries must not use that URL.Prerequisites (org secrets / aw-tauri)
This CI path is ready, but end-to-end updates also need:
TAURI_SIGNING_PRIVATE_KEY(and optionalTAURI_SIGNING_PRIVATE_KEY_PASSWORD)createUpdaterArtifacts: true, the matching public key, and the edition-specific endpoint aboveWithout signing / updater artifacts, the generate step fails intentionally (no empty manifest).
Test plan
.sigfiles), verify platform keys and asset URLs for bothlatest.jsonandlatest-research.json.sigassets appear on the draft release