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

Merged
David merged 2 commits from fix/desktop-twin-trigger-publish into main 2026-06-22 03:02:30 +02:00
Owner

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) 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 bundle is actually built.

Verification

Both workflow YAMLs parse; 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). 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.

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`) 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 bundle is actually built. ## Verification Both workflow YAMLs parse; 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`). 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.
fix(ci): derive desktop publish version from trigger, not git describe
All checks were successful
check-secrets / TruffleHog (push) Successful in 3s
check-secrets / Nosey parker (push) Successful in 3s
check-secrets / Kingfisher (push) Successful in 5s
check-secrets / Nosey parker (pull_request) Successful in 3s
check-secrets / TruffleHog (pull_request) Successful in 4s
check-secrets / Kingfisher (pull_request) Successful in 6s
Check / clippy + fmt + tests (pull_request) Successful in 2m48s
40db0dee1c
The Linux and Windows desktop-build workflows 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 bundle is actually built.

#GOV-13
Merge branch 'main' into fix/desktop-twin-trigger-publish
All checks were successful
check-secrets / Nosey parker (push) Successful in 3s
check-secrets / Kingfisher (push) Successful in 4s
check-secrets / TruffleHog (push) Successful in 5s
check-secrets / Nosey parker (pull_request) Successful in 8s
check-secrets / TruffleHog (pull_request) Successful in 11s
check-secrets / Kingfisher (pull_request) Successful in 13s
Check / clippy + fmt + tests (pull_request) Successful in 6m31s
Create release / Create release from merged PR (pull_request) Has been skipped
bf76d8aaa1
David merged commit f33f41ed4b into main 2026-06-22 03:02:30 +02:00
David deleted branch fix/desktop-twin-trigger-publish 2026-06-22 03:02:30 +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/lets-chat!391
No description provided.