ci(release): decouple latest/release publish trains and add dry-run (FJ-24) #23
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ci/decouple-publish-trains-dry-run-fj-24"
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?
Summary
Fully decouples the
latestandreleasepublish trains and adds a zero-mutation dry-run to both binary build workflows (FJ-24). The publish mode is now derived from the workflow trigger, not fromgit describe, so a release tag publishes only its immutable versioned package and amainpush publishes onlylatestplus the manifest.What changed
oci-build/get-tags.nuis now a pure resolver that takes--mode(release|latest|dry-run),--ref-name, and--simulate-tag, and returns a single{ mode, train, tag, describe }record. It returns the single tag appropriate to the mode ([<version>]orlatest) instead of[<version>, latest].git describeis kept ONLY to fill the manifesttagfield; it no longer decides the train. Both workflows call this one resolver so they cannot drift.refs/tags/v*push (github.ref_type == tag) maps torelease, amainpush maps tolatest, andworkflow_dispatchmaps todry-run.<version>artifact URL and fails the build on HTTP 200 instead of pre-deleting and re-uploading. No 404 window, no silent replacement of a released artifact. Thelatesttrain keeps delete-then-reupload (overwrite) semantics.latesttrain (if: steps.resolve.outputs.train == 'latest'), so a release build never writeslatest/version-<arch>.jsonand never resetslatestto the release commit.build-binary.ymlandbuild-binary-windows.ymlacceptworkflow_dispatchwithdry_run(boolean, defaulttrue) andsimulate_tag(string, optional). A dry-run builds the binary, computes every delete/upload URL, prints exactly what it WOULD do, and mutates nothing. A non-emptysimulate_tag(e.g.v9.9.9) makes the dry-run exercise and print thereleasepublish path from a non-tag ref, so the release publish can be validated beforejust create-releaseis run.create-release.ymlor thejust create-releasebump logic.Validation
oci-build/get-tags.nuexercised across all modes locally (nu 0.112.2):release->tag=v1.2.3,latest->tag=latest,dry-run(no sim) ->train=latest,dry-run --simulate-tag v9.9.9->train=release tag=v9.9.9. Missing-version and unknown-mode both exit non-zero.push+workflow_dispatchtriggers.Acceptance criteria
v*tag build publishes the binary ONLY to the<version>path; nolatestbinary, no manifest.mainpush publishes ONLYlatest+latest/version-<arch>.json; no<version>path.git describe.<version>artifact fails the build);latestretains overwrite semantics.workflow_dispatchwithdry_rundefaulting totrue; dry-run prints every action and performs none.simulate_tagmakes the dry-run exercise and print thereleasepublish path from a non-tag ref.get-tags.nureturns a single tag for the mode; doc comment and the two workflows updated to share the logic.create-releaseflow unchanged;latestcontinues to trackmainand is not reset to the release commit.Resolves FJ-24.
🤖 Generated with Claude Code