fix(ci): derive desktop publish version from trigger to kill twin-publish race #391
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/desktop-twin-trigger-publish"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Rolls out the GOV-13 twin-trigger publish fix to this repo's desktop-bundle workflows (
build-desktop-linux.yml,build-desktop-windows.yml). Part of GOV-16.Problem
Both workflows resolved the Generic Packages path label (
version) fromgit describe. A release commit is simultaneously a push tomainand the tagged commit, so the main-push run and the tag/release run resolved the samevX.Y.Zpath and raced to DELETE-then-PUT the same immutable generic-package file:409 package file already exists. A describe-derived label also published main builds that were N commits past a tag under the bare tag, freezing thelatesttrain and clobbering the release artifact.Fix
Resolve the path label from the trigger (
github.event_name/github.ref), never fromgit describe: a release/tag build publishes under its semver tag; every other build is apush: branches: mainbuild and publishes under the movinglatestpackage. The two trains write disjoint paths, so they never collide. This matches the proven yotun desktop pattern and the forgejo-cli reference adopted in GOV-13.Releases here are cut by
create-release.ymlvia the Forgejo API, and an API-created tag does NOT raisepush: tags: v*(YOTUN-29), so arelease: publishedtrigger is added so the versioned release bundle is actually built.Verification
Both workflow YAMLs parse; all embedded nu
run:blocks passnu --ide-check; the trigger-derived resolver was exercised for the release-event, tag-push, and main-push cases (release/tag ->vX.Y.Z, main ->latest). The change is confined to CI workflow YAML (no Rust/Bun/formatted source), so fmt/clippy/build/test are unaffected.Refs GOV-13, GOV-16.