Skip to content

release: in-memory version bump (no commit to main)#11

Merged
osolmaz merged 2 commits into
mainfrom
feat/release-in-memory
Feb 18, 2026
Merged

release: in-memory version bump (no commit to main)#11
osolmaz merged 2 commits into
mainfrom
feat/release-in-memory

Conversation

@dutifulbob
Copy link
Copy Markdown
Member

Summary

In-memory version bump — release-it never pushes commits to main, so branch protection is never hit.

How it works

  1. npm version <patch|minor|major> --no-git-tag-version bumps package.json in the CI working directory only
  2. release-it reads the bumped version, publishes to npm, pushes a git tag, and creates a GitHub release
  3. The version-bump commit is never pushed — it dies with the CI runner

Changes

  • .release-it.json: commit: false, requireCleanWorkingDir: false, npm.version: false
  • .github/workflows/release.yaml: adds npm version step before release-it, keeps workflow_dispatch with patch/minor/major input
  • package.json version reset to 0.1.0 as base for future bumps

Trade-off

package.json on main always shows the base version (0.1.0). The real version lives in npm + git tags. This is fine for a library.

- npm version runs in CI working directory only, never committed
- release-it tags + publishes from the bumped package.json
- branch protection is never hit
- reset version to 0.1.0 as base for future bumps
package.json version on main is irrelevant — the workflow
fetches the real latest from the npm registry, bumps it
(patch/minor/major), and writes to package.json in the CI
working directory only. Nothing is committed to main.
@osolmaz osolmaz merged commit cb6cc73 into main Feb 18, 2026
1 check 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.

2 participants