Skip to content

Release: release on merge to main, publish on GitHub release - #7

Merged
asveloper merged 2 commits into
mainfrom
develop
Nov 22, 2026
Merged

asveloper merged 2 commits into
mainfrom
develop

Conversation

@asveloper

Copy link
Copy Markdown
Contributor

The version stays 0.2.1, which is already released and on npm, so this merge creates nothing; release.yml logs that v0.2.1 exists. The next version bump releases automatically.

How releases work now:

1. Bump the version in package.json and src/version.ts and add its CHANGELOG.md section (in the PR, as before).
2. Merge develop into main. release.yml creates the GitHub release vX.Y.Z with that changelog section as notes. If the release already exists (no version bump), it does nothing.
3. publish.yml publishes the same version to npm with trusted publishing. It runs when release.yml starts it, or when a release is published by hand on GitHub. It checks that the release tag matches package.json and skips a version that's already on npm.

So the GitHub release and the npm version always match.

- release.yml starts publish.yml with workflow_dispatch, because a release created with the workflow token doesn't trigger other workflows.
- publish.yml keeps its file name, so the npm trusted publisher entry (workflow publish.yml) still applies.
- The tag-push trigger is gone; CONTRIBUTING.md describes the new steps.

The existing v0.2.1 tag has no release and isn't on npm; after this reaches main, release.yml creates the v0.2.1 release and publishes it.
Release on merge to main, publish to npm on each GitHub release
@asveloper
asveloper merged commit 67d67e2 into main Nov 22, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant