Release flow: tag-triggered publish + release-it config#2
Open
shipstatic-com wants to merge 2 commits intomainfrom
Open
Release flow: tag-triggered publish + release-it config#2shipstatic-com wants to merge 2 commits intomainfrom
shipstatic-com wants to merge 2 commits intomainfrom
Conversation
Switch the release process from "auto-publish on push to main" to
"release-it locally → tag-triggered CI publish". This brings the package
in line with n8n's verification expectations: code repo and npm stay in
sync, and every release has notes.
Workflow (.github/workflows/npm-publish.yml):
- Trigger on tag push (`v*`) instead of branch push to main
- Add `pnpm lint` + `pnpm test --run` gates before publish (real CI guardrails)
- Use `pnpm install --frozen-lockfile` for reproducible builds
Release-it config (.release-it.json):
- Tag format `v${version}` to match existing convention
- Require `main` branch + clean working dir (safety)
- Create GitHub Release with auto-generated notes from commits/PRs
- Skip npm publish from local — CI handles it on tag push (single source
of truth for the publish artifact, built in a clean environment)
- Hooks: lint+test before init, build after version bump
How releases work now:
pnpm run release # local: bump → commit → tag → push → GitHub Release
→ tag push triggers Action → lint + test + build + npm publish
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.
Why
Per n8n's community-node verification process, the recommended pattern is to use a release tool (n8n-node release / release-it) so the code repo and npm stay in sync and every release has notes. Our current
npm-publish.ymlauto-publishes on every push tomainwith no tag, no GitHub Release, and no test/lint gate — none of which n8n's guideline-check has visibility into.This PR switches us to the recommended pattern with minimal change.
How it works after this PR
The local
releasescript invokes the existingrelease-it(already in devDeps). The CI's only job is the npm publish itself, in a clean environment, gated by lint+test.What's in this PR
.github/workflows/npm-publish.ymlpush: branches: [main]→push: tags: ['v*']pnpm lint+pnpm test --runsteps before publish (real CI guardrails — previously the workflow could publish a regression)pnpm install --frozen-lockfilefor reproducible builds.release-it.json(new)v${version}(matches existing convention)mainbranch + clean working dir (safety)github.release: truewithautoGenerate: true— release notes from commits/PRs since the previous tagnpm.publish: false— the CI workflow is the single source of truth for the publish artifactEffect on the next release
v0.7.0tag → publishes.Verification
release-it.jsonmatches release-it@19 schemaTest plan
pnpm run releaselocally from main → confirm version bump, tag, GitHub Release with notes