Skip to content

ci(release): drop stray latest.json from release assets - #52

Merged
pmaxhogan merged 1 commit into
mainfrom
ci/suppress-latest-json
Jun 27, 2026
Merged

pmaxhogan merged 1 commit into
mainfrom
ci/suppress-latest-json

Conversation

@pmaxhogan

Copy link
Copy Markdown
Owner

Summary

tauri-apps/tauri-action attaches a latest.json updater manifest to the GitHub Release on publish even though the build job sets uploadUpdaterJson: false. The app uses Cloudflare-hosted, channel-in-path manifests (updates/<channel>/<os>/<arch>/update.json), so the stray target-flat latest.json is harmless but is confusing clutter on the Release assets (issue #29).

This adds an idempotent post-publish cleanup step that deletes any latest.json asset from the just-created GitHub Release for the pushed tag.

What changed

  • .github/workflows/release.yml: new step Remove stray latest.json from the release in the publish-updater-manifest job.
    • That job runs ONCE (needs: build), so it executes only after every matrix build's tauri-action upload has completed. It already has the tag (RELEASE_TAG: ${{ github.ref_name }}, job-level env - not hardcoded) and GITHUB_TOKEN, so the cleanup runs exactly once after all assets exist.
    • Idempotent: it queries gh release view "$RELEASE_TAG" --json assets for an asset named latest.json and only calls gh release delete-asset "$RELEASE_TAG" latest.json --yes when one is present; otherwise it logs and exits 0. The gh release view ... --json assets --jq / gh release delete-asset ... --yes forms match the patterns already used in dev-channel.yml.

Why uploadUpdaterJson: false does not suppress it

src-tauri/tauri.conf.json sets bundle.createUpdaterArtifacts: true, so the Tauri bundler emits updater artifacts and tauri-action generates a latest.json. Per the tauri-action action.yml + docs (verified via Context7), uploadUpdaterJson (default true) is the correct input and the current dev branch gates the upload on it (if (shouldUploadUpdaterJson) { uploadVersionJSON(...) }). However this repo pins the floating tauri-apps/tauri-action@v0 major tag, whose resolved build does not match that current dev-branch logic, so the generated latest.json is still attached despite the flag. The input name itself is correct (a previous codex pass already confirmed includeUpdaterJson does not exist), so renaming is not the fix - the robust fix shipped here is the post-publish delete.

Why dev-channel.yml is unchanged

dev-channel.yml's tauri-action step has NO tagName, so it builds only and creates/uploads no release (and thus no latest.json). The rolling dev pre-release is assembled by softprops/action-gh-release from dev-artifacts/*, which is populated by a find allow-list (.dmg, .app.tar.gz(.sig), .msi(.sig), -setup.exe(.sig), .AppImage(.sig), .deb) that excludes latest.json. And even if a latest.json ever did land there, the existing gc-stale-dev-assets job already deletes every asset not carrying the run's dev version. So no cleanup is needed there.

Testing

This is YAML/CI only - no app code changed, so the pnpm/cargo gates were skipped per the task. Validation run:

  • actionlint .github/workflows/release.yml - PASS
  • actionlint .github/workflows/dev-channel.yml - PASS (unchanged, sanity check)
  • python -c "import yaml; yaml.safe_load(open('.github/workflows/release.yml'))" - parses
  • python -c "import yaml; yaml.safe_load(open('.github/workflows/dev-channel.yml'))" - parses
  • git diff | grep -P '[^\x00-\x7F]' - no non-ASCII introduced; file remains LF ASCII text
  • Step ordering verified: the cleanup lives in publish-updater-manifest (needs: build), so it runs after all tauri-action uploads; RELEASE_TAG resolves from job-level github.ref_name.

This cannot be fully proven until the next real tagged release exercises release.yml end to end (the cleanup only runs on a v* tag push). The idempotent delete-asset + actionlint/YAML lint is the ceiling here; the delete is a safe no-op if latest.json is ever absent.

Closes #29

🤖 Generated with Claude Code

https://claude.ai/code/session_01MZQh3ZfwtZsM6c5qnTuWZP

tauri-action attaches a `latest.json` updater manifest to the GitHub
Release even though the build job sets `uploadUpdaterJson: false`. The
input name is correct, but on the floating `tauri-apps/tauri-action@v0`
tag the suppression is not reliable: tauri.conf.json has
`createUpdaterArtifacts: true`, so the bundler emits updater artifacts
and the resolved `@v0` build still uploads the generated `latest.json`.

Driven serves its own channel-in-path manifests from Cloudflare Pages
(updates/<channel>/<os>/<arch>/update.json), so a target-flat
`latest.json` on the Release is harmless but confusing clutter (#29).

Add an idempotent post-publish cleanup to the publish-updater-manifest
job. That job runs ONCE (needs: build) after every matrix build's
tauri-action upload, and has the tag (RELEASE_TAG = github.ref_name) plus
GITHUB_TOKEN, so the cleanup runs exactly once after all assets exist. It
checks `gh release view --json assets` for a `latest.json` asset and only
calls `gh release delete-asset` when present, so it is a no-op (exit 0)
when absent.

dev-channel.yml is intentionally left unchanged: its tauri-action step
has no tagName (it creates/uploads nothing), the rolling dev release is
assembled by softprops/action-gh-release from a find allow-list that
excludes latest.json, and the existing gc-stale-dev-assets job already
deletes any asset not carrying the run's dev version.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MZQh3ZfwtZsM6c5qnTuWZP
@github-actions

Copy link
Copy Markdown
Contributor

Coverage

Area main this PR delta
Rust (lib crates) 76.60% 76.60% +0.00 (OK)
UI (vue/ts) 87.17% 87.17% +0.00 (OK)

Gate: passed - no coverage regression (epsilon 0.1 pp).

@pmaxhogan
pmaxhogan marked this pull request as ready for review June 27, 2026 01:47
@pmaxhogan
pmaxhogan merged commit 5b52c7a into main Jun 27, 2026
18 checks passed
@pmaxhogan
pmaxhogan deleted the ci/suppress-latest-json branch June 27, 2026 02:04
@github-project-automation github-project-automation Bot moved this from Todo to Done in Driven Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

tauri-action latest.json suppression not taking effect

1 participant