ci(release): publish Tauri updater latest.json on tag releases - #1372
Conversation
Greptile SummaryAdds Tauri updater publishing to tagged releases.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains; the prior shell-injection path now uses quoted environment variables, and the checkout in the contents-write release job is pinned to an immutable commit. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
Tag["v* tag push"] --> Build["Cross-platform Tauri builds"]
Secrets["Tauri signing secrets"] --> Build
Build --> Signed["Signed updater bundles and .sig files"]
Signed --> Collect["Normalize edition, platform, and architecture filenames"]
Collect --> Download["Release job downloads build artifacts"]
Download --> Manifest["Generate latest.json or latest-research.json"]
Manifest --> Draft["Upload manifest and updater assets to draft release"]
Download --> Draft
Reviews (2): Last reviewed commit: "fix(release): match known updater bundle..." | 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: |
…t strip AppImage/NSIS/MSI names embed the crate version, so stripping after the first dot produced assets like linux-x86_64.1.0_amd64.AppImage. Match Tauri updater suffixes explicitly, and prefer NSIS over MSI when both signatures exist for the same Windows platform key.
@ErikBjare Fixed the Also took the Windows note: The aw-tauri |
|
Verified the two fixes from the latest push:
CI build jobs are still running (pending). Both confirmed addressable concerns from Erik's 19:51 review are resolved. Ready to merge once CI clears. |
|
@greptileai review |
|
CI is now fully green (all checks pass). Greptile re-review from this morning also came back 5/5 — no new findings. Both concerns from Erik's 22 Aug review (ext extraction, Windows NSIS preference) are verified fixed. PR is mergeable. Waiting on maintainer merge. |
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