ci: release on push to main - #6
Merged
Merged
Conversation
The workflow only listened for `v*` tags, so a merged PR never reached npm. It now plans from the conventional commits since the last tag, cuts the version with release-it and publishes in the same run. Pushes made with GITHUB_TOKEN do not start another run, so the tag it pushes cannot loop. The tag trigger stays as the manual escape hatch, and the file name stays `release.yml` because npm's trusted publisher config points at it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
What changed
The
Releaseworkflow now runs on every push tomain: it plans the version from theconventional commits since the last tag, cuts it with release-it and publishes in the same
run. The
v*tag trigger stays as the manual escape hatch.Why
The workflow only listened for
v*tags, so merging a PR never reached npm — someone had toremember to run
yarn releaseby hand. #5 landed the card positioning fix onmainand itis still unpublished; npm serves 0.2.1 while
maincarries afix.Three details worth reviewing:
GITHUB_TOKENdoes not start another workflow run, sothe
chore: releasecommit and the tag the bot pushes do not re-enter.release.ymlbecause npm's trusted publisher config points at it.feat,fix,perfand breaking changes cut a version. A push carrying nothingbut
docs,test,choreorstyleskips the whole thing and rides along with the nextrelease.
Two things to know before merging:
fix(overlay)is already inrange. That is the point, but it is not a no-op.
mainhaving no branch protection, which is the case today. Adding a rulethat requires PRs would break the bot's push and need a PAT or a bypass.
How it was verified
The plan guard, against the real history:
v0.2.1..HEAD→ release,v0.2.0..v0.2.1(onlychore: release) → skip,v0.1.2..v0.2.0(hasfeat!) → release, empty range → skip.release-it --ci --dry-runresolves0.2.1...0.2.2, writes the changelog entry forfix(overlay): forward card positioning data, and tagsv0.2.2.The workflow YAML parses and the job graph is
plan → verify → publish.actionlintwas not run — it is not installed here.yarn lint— zero errors and zero warningsyarn typecheckyarn test— 15 suites, 97 testsRan the example on a device or simulator — not applicable, no library code changed
If it touches the tour surface
Not applicable — this only touches CI and
CONTRIBUTING.md.If it touches the build
The publish path changed, so this was checked:
yarn prepare && grep -r '@/' lib/comes back empty — the alias must notreach the published package
yarn verify:lib—lib/ is portable🤖 Generated with Claude Code