Repository navigation
ci: make merging a version bump the whole release - #25
Merged
Merged
Conversation
Releasing needed a manual tag push and a hand-created GitHub Release. Now a push to main whose package.json version has no matching tag runs the full gate, tags, creates the release and publishes. One workflow rather than two: a release created with GITHUB_TOKEN does not trigger further workflow runs, so the old release:published publish job would never have fired for an automated release. That is the same silent-no-publish failure the trigger fix just addressed, so npm-publish-github-packages.yml is replaced rather than kept alongside. Pushes whose version is already tagged are a no-op, so ordinary merges do not publish. Every step is idempotent and workflow_dispatch retries a failed run without needing another version bump. Docs updated: the release flow is now branch, pnpm version, PR, merge. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Replaces the manual tag push and hand-created GitHub Release. Merge this before the 2.16.0 bump (#24) — see ordering below.
How it works
release.ymlruns on every push tomain. Ifpackage.json's version has no matchingvX.Y.Ztag, it runs the full gate — lint, build, unit tests, MinIO integration — then tags, creates the GitHub Release with generated notes, and publishes.Releasing becomes: branch →
pnpm version→ PR → merge. Nothing manual after that.Why one workflow, not two
The obvious design is "workflow creates the release,
release: publishedpublishes it". That does not work: a release created withGITHUB_TOKENdoes not trigger further workflow runs — GitHub blocks it to prevent recursion. The publish job would simply never fire.That is the same silent-no-publish failure mode as the
created/publishedtrigger bug, sonpm-publish-github-packages.ymlis replaced rather than kept alongside — two publish paths where one silently does nothing is worse than one.Safety
checkjob exits early. Merging this PR is itself the first test of that:mainis at 2.15.0,v2.15.0exists, so the workflow should no-op.workflow_dispatchretries a failed run without another version bump.github.event_name(a fixed enum) and the version read frompackage.json, passed throughenv.stackbox-standard-tags) blocks only deletion and non-fast-forward.Docs
CONTRIBUTING.md,CLAUDE.mdand.claude/skills/release/SKILL.mdnow describe the real flow. They previously said "do not create tags by hand — creating the GitHub Release creates the tag", which was my error: it did not match thepnpm versionpractice actually in use, and is now superseded anyway.Ordering
mainstill at 2.15.0,v2.15.0already tagged → workflow no-ops. Confirms the guard.v2.16.0tag → full gate, tag, release, publish.Merging them the other way round would have #24 land with no release workflow present, back to a manual tag push.
Verification
YAML validates; jobs
checkandrelease; triggerspush+workflow_dispatch; permissionscontents: write,packages: write. Lint, build andprettier --checkclean.The workflow itself cannot be fully exercised until it runs — which is why step 1 above is a real no-op test rather than a formality.