ci(release): drop stray latest.json from release assets - #52
Merged
Merged
Conversation
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
Contributor
Coverage
Gate: passed - no coverage regression (epsilon 0.1 pp). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tauri-apps/tauri-actionattaches alatest.jsonupdater manifest to the GitHub Release on publish even though the build job setsuploadUpdaterJson: false. The app uses Cloudflare-hosted, channel-in-path manifests (updates/<channel>/<os>/<arch>/update.json), so the stray target-flatlatest.jsonis harmless but is confusing clutter on the Release assets (issue #29).This adds an idempotent post-publish cleanup step that deletes any
latest.jsonasset from the just-created GitHub Release for the pushed tag.What changed
.github/workflows/release.yml: new stepRemove stray latest.json from the releasein thepublish-updater-manifestjob.needs: build), so it executes only after every matrix build'stauri-actionupload has completed. It already has the tag (RELEASE_TAG: ${{ github.ref_name }}, job-level env - not hardcoded) andGITHUB_TOKEN, so the cleanup runs exactly once after all assets exist.gh release view "$RELEASE_TAG" --json assetsfor an asset namedlatest.jsonand only callsgh release delete-asset "$RELEASE_TAG" latest.json --yeswhen one is present; otherwise it logs and exits 0. Thegh release view ... --json assets --jq/gh release delete-asset ... --yesforms match the patterns already used indev-channel.yml.Why
uploadUpdaterJson: falsedoes not suppress itsrc-tauri/tauri.conf.jsonsetsbundle.createUpdaterArtifacts: true, so the Tauri bundler emits updater artifacts and tauri-action generates alatest.json. Per the tauri-actionaction.yml+ docs (verified via Context7),uploadUpdaterJson(defaulttrue) is the correct input and the currentdevbranch gates the upload on it (if (shouldUploadUpdaterJson) { uploadVersionJSON(...) }). However this repo pins the floatingtauri-apps/tauri-action@v0major tag, whose resolved build does not match that currentdev-branch logic, so the generatedlatest.jsonis still attached despite the flag. The input name itself is correct (a previous codex pass already confirmedincludeUpdaterJsondoes 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'stauri-actionstep has NOtagName, so it builds only and creates/uploads no release (and thus nolatest.json). The rollingdevpre-release is assembled bysoftprops/action-gh-releasefromdev-artifacts/*, which is populated by afindallow-list (.dmg,.app.tar.gz(.sig),.msi(.sig),-setup.exe(.sig),.AppImage(.sig),.deb) that excludeslatest.json. And even if alatest.jsonever did land there, the existinggc-stale-dev-assetsjob 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- PASSactionlint .github/workflows/dev-channel.yml- PASS (unchanged, sanity check)python -c "import yaml; yaml.safe_load(open('.github/workflows/release.yml'))"- parsespython -c "import yaml; yaml.safe_load(open('.github/workflows/dev-channel.yml'))"- parsesgit diff | grep -P '[^\x00-\x7F]'- no non-ASCII introduced; file remains LF ASCII textpublish-updater-manifest(needs: build), so it runs after alltauri-actionuploads;RELEASE_TAGresolves from job-levelgithub.ref_name.This cannot be fully proven until the next real tagged release exercises
release.ymlend to end (the cleanup only runs on av*tag push). The idempotentdelete-asset+ actionlint/YAML lint is the ceiling here; the delete is a safe no-op iflatest.jsonis ever absent.Closes #29
🤖 Generated with Claude Code
https://claude.ai/code/session_01MZQh3ZfwtZsM6c5qnTuWZP