fix(ci): derive desktop publish version from trigger to kill twin-publish race #42

Merged
David merged 2 commits from fix/desktop-twin-trigger-publish into main 2026-06-21 14:42:11 +02:00
Owner

Rolls out the GOV-13 twin-trigger publish fix to this repo's desktop-bundle workflow (build-desktop-linux.yml). Part of GOV-16.

Problem

The workflow resolved the Generic Packages path label (version) from git describe. A release commit is simultaneously a push to main and the tagged commit, so the main-push run and the tag/release run resolved the same vX.Y.Z path 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 the latest train and clobbering the release artifact.

Fix

Resolve the path label from the trigger (github.event_name / github.ref), never from git describe: a release/tag build publishes under its semver tag; every other build is a push: branches: main build and publishes under the moving latest package. 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.yml via the Forgejo API, and an API-created tag does NOT raise push: tags: v* (YOTUN-29), so a release: published trigger is added so the versioned release binary is actually built.

Verification

The workflow YAML parses; all embedded nu run: blocks pass nu --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). just pre-commit (full rust-builder-glibc fmt/clippy/check/test suite) passed; the change itself is confined to CI workflow YAML.

Refs GOV-13, GOV-16.

Rolls out the GOV-13 twin-trigger publish fix to this repo's desktop-bundle workflow (`build-desktop-linux.yml`). Part of GOV-16. ## Problem The workflow resolved the Generic Packages path label (`version`) from `git describe`. A release commit is simultaneously a push to `main` and the tagged commit, so the main-push run and the tag/release run resolved the same `vX.Y.Z` path 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 the `latest` train and clobbering the release artifact. ## Fix Resolve the path label from the trigger (`github.event_name` / `github.ref`), never from `git describe`: a release/tag build publishes under its semver tag; every other build is a `push: branches: main` build and publishes under the moving `latest` package. 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.yml` via the Forgejo API, and an API-created tag does NOT raise `push: tags: v*` (YOTUN-29), so a `release: published` trigger is added so the versioned release binary is actually built. ## Verification The workflow YAML parses; all embedded nu `run:` blocks pass `nu --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`). `just pre-commit` (full rust-builder-glibc fmt/clippy/check/test suite) passed; the change itself is confined to CI workflow YAML. Refs GOV-13, GOV-16.
fix(ci): derive desktop publish version from trigger, not git describe
All checks were successful
Check / fmt + clippy + build + tests (pull_request) Successful in 1m12s
7ae94b76c4
The Linux desktop-build workflow resolved the Generic Packages path label from `git describe`. On a release commit (which is simultaneously a push to `main` and the tagged commit) the main-push run and the tag/release run resolved the identical `vX.Y.Z` path and raced to DELETE-then-PUT the same immutable generic-package file, producing `409 package file already exists`. A `git describe`-derived label also published main builds that were N commits past a tag under the bare tag, freezing the `latest` train and clobbering the release artifact.

Resolve the path label from the trigger instead: a release/tag build publishes under its semver tag; every other build is a `push: branches: main` build and publishes under the moving `latest` package. The two trains write disjoint paths, so they never collide.

Releases here are cut by create-release.yml via the Forgejo API, and an API-created tag does NOT raise `push: tags: v*` (YOTUN-29), so add a `release: published` trigger (matching yotun) so the versioned release binary is actually built.

#GOV-13
Merge branch 'main' into fix/desktop-twin-trigger-publish
All checks were successful
Check / fmt + clippy + build + tests (pull_request) Successful in 5m45s
Create release / Create release from merged PR (pull_request) Has been skipped
2a581c0f34
David merged commit a2dd154f16 into main 2026-06-21 14:42:11 +02:00
David deleted branch fix/desktop-twin-trigger-publish 2026-06-21 14:42:11 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/vervain-apps!42
No description provided.