Skip to content

fix(release): publish automatically when a version bump merges to main - #5

Merged
a-tokyo merged 1 commit into
mainfrom
ci/auto-release-on-merge
Oct 19, 2026
Merged

a-tokyo merged 1 commit into
mainfrom
ci/auto-release-on-merge

Conversation

@a-tokyo

@a-tokyo a-tokyo commented Oct 19, 2026

Copy link
Copy Markdown
Member

Why

Merging #4 bumped the version to 0.1.6 but nothing was published. release.yml only triggered on v* tag pushes, and no tag was pushed. Only CI ran.

What

  • release.yml also runs on pushes to main that touch package.json or the workflow, plus workflow_dispatch.
  • New check job: on a tag push, verifies the tag matches package.json. On main, releases only if v<version> is not tagged yet.
  • publish skips npm publish if the version is already on npm. release skips if the GitHub Release exists and creates the tag otherwise (via --target $GITHUB_SHA). Re-runs are safe.
  • File name is unchanged, so the npm Trusted Publisher binding still applies.

Merging this ships 0.1.6

This PR edits release.yml, so its merge triggers the workflow on main. v0.1.6 does not exist yet, so it publishes 0.1.6 and creates the release.

Vulnerabilities

One open alert left: braces GHSA-vfj7-8cjw-p6xm (via @next/eslint-plugin-next → fast-glob@3.3.1 → micromatch → braces@3.0.3). Every braces version is affected and no patch exists, so there is nothing to bump. npm audit fix suggests a downgrade to @next/eslint-plugin-next@14, which is wrong.

🤖 Generated with Claude Code

release.yml only ran on `v*` tag pushes, so merging #4 (0.1.6) released
nothing: no one pushed the tag. Now a push to main that changes
package.json publishes when `v<version>` is not yet tagged, and the
release job creates the tag. Manual tag pushes still work. Publish and
release skip work already done, so re-runs are safe.
@a-tokyo
a-tokyo force-pushed the ci/auto-release-on-merge branch from 91433bf to 39a7679 Compare October 19, 2026 14:44
@a-tokyo
a-tokyo merged commit 3d50623 into main Oct 19, 2026
2 checks passed
@a-tokyo
a-tokyo deleted the ci/auto-release-on-merge branch October 19, 2026 15:07
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