Repository navigation
ci: publish to npm on merge into main - #27
Open
bcostaaa01 wants to merge 3 commits into
Open
bcostaaa01 wants to merge 3 commits into
bcostaaa01 wants to merge 3 commits into
Conversation
The release workflow checks whether the version in package.json is already on npm. If not, it runs the CI workflow, publishes with npm trusted publishing (OIDC, with provenance) and creates the vX.Y.Z tag and GitHub release, using the matching CHANGELOG.md section as the release notes. Merges without a version bump publish nothing.
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
ci.yml: runsnpm run ci(lint, typecheck, tests, DOM tests, build, smoke) on every pull request, on Node 20 and 24. Node 18 is left out because jsdom 29 needs Node 20 or newer.release.yml: on every push tomain, checks whether the version inpackage.jsonis already on npm.CHANGELOG.mdhas a section for it, runs the CI workflow, publishes to npm and creates thevX.Y.Ztag plus a GitHub release with that changelog section as the notes.1.0.0-beta.1) goes to thenextdist-tag and is marked as a prerelease on GitHub.scripts/release-notes.mjs: prints theCHANGELOG.mdsection of a version, with an emoji on each heading (✨ Added, 🔧 Changed, 🐛 Fixed, ...), plus a link to the version on npm and its install command. It fails when the section is missing or empty.The release flow stays as it is: bump the version and add the changelog section in a
chore(release): x.y.zPR, then merge it.Before merging: npm trusted publisher
Publishing uses npm trusted publishing (OIDC), so there is no
NPM_TOKENsecret. An owner of thestickyflowpackage on npmjs.com has to add the trusted publisher once:stickyflow→ Settings → Trusted Publisher → GitHub ActionsStickyflowstickyflow.jsrelease.ymlMerging this PR on its own publishes nothing, because
0.5.0is already on npm. The first publish happens with the next version bump.