Repository navigation
ci(release): tag a release only after every check and test passes - #2382
Merged
Merged
Conversation
Run release.yml by hand with a version (gh workflow run release.yml -f version=X.Y.Z) on main's tip. It refuses a malformed version, another ref, a commit main has moved past, an existing tag and a version proxy.golang.org already serves, runs the changelog, fragment and Android runtime checks and every test.yml job through a new all-jobs input, the Apple simulator job included, and only then creates the annotated tag on the tested commit, publishes the notes and announces the version to the proxy in the same run. Only the publishing job can write. The tag-push trigger keeps working, and a failure on that path now says the version is already public. The release docs in changelog.d, AGENTS.md and the contributing guide describe the new steps. Closes #2380.
houko
enabled auto-merge (rebase)
November 25, 2026 10:23
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.
Closes #2380.
What changed
release.ymlgainsworkflow_dispatchwith a requiredversioninput (X.Y.ZorX.Y.Z-suffix). Before any test starts, the run refuses a malformed version, a ref other thanmain, a commit that is no longer main's tip, a tag that already exists locally or on the remote, and a versionproxy.golang.orgalready serves (asked withDisable-Module-Fetch: true, so the question neither fetches the version nor caches its absence).changelog.d, Android runtime built from its Java) and callstest.ymlwith a newall-jobs: trueinput, which runs the Apple jobs andapple-simulatorwhatever the event and the change. Pull request and merge queue runs are unchanged.vX.Y.Z(messageNSGo X.Y.Z) on the tested commit through the Git data API, publishes the changelog section as the release (a prerelease for a suffixed version) and announces the version to the proxy, all in the same run, since a ref created withGITHUB_TOKENstarts no workflow. Creating a ref that already exists fails, so an existing tag is never moved. That job is the only one withcontents: write.burnedjob writes an error and a step summary saying the version is already public and the next release needs the dispatch.release.yml's header,changelog.d/README.md,AGENTS.mdand the contributing guide (every language) describe the new steps.How to release now
go run ./tools/changelog release X.Y.Z, edit the section, and merge it tomain.gh workflow run release.yml -R nsgo-dev/nsgo --ref main -f version=X.Y.Z(or Actions > Release > Run workflow onmain).CHANGELOG.mdas before.Do not push the tag yourself.
Tests
quality.ymlinstalls) with shellcheck: no findings.go tool nsgo test -run '^TestCheckWorkflowVetsEveryTargetOnce$' ./cmd/nsgo, the repository's workflow test: passes.0.3.3,0.3.3-rc.1,v0.3.3,0.3,0.3.3;rmand0.3.3-;git ls-remote --exit-codereturning 2 for a missing tag and 0 forv0.3.2; the proxy answering 200 forv0.3.1and 404 for an untagged version withDisable-Module-Fetch; and the compare API answeringidenticaloraheadfor a commit on main.main, so its first real run is the next release.Screenshots
None.