Skip to content

fix(ci): publish the version from the release tag - #10

Merged
3m1n3nc3 merged 1 commit into
mainfrom
fix/publish-release-version
Nov 5, 2026
Merged

3m1n3nc3 merged 1 commit into
mainfrom
fix/publish-release-version

Conversation

@3m1n3nc3

@3m1n3nc3 3m1n3nc3 commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

The Publish to NPM workflow ignored the release tag. Publishing release 1.5.0 put 1.3.37 on npm, because the workflow only bumped the patch of the published version.

Changes

A single "Resolve version" step now chooses the version in this order:

  1. The version input on a manual run.
  2. The release tag on a release (or a tag push). A leading v is dropped, so both 1.5.0 and v1.5.0 work.
  3. Otherwise, package.json if it's ahead of npm, or a patch bump from the npm version.

The step fails early if the version isn't valid semver or is already on npm, so a stale or reused tag fails before tests and build run, not at pnpm publish.

The new version is written to package.json for the build. After the publish, it's committed to main from a fresh checkout of main. The old step pushed HEAD:main from the release's detached tag checkout, which fails when main has moved past the tag.

This also removes the broken "Set version from input" step, which wrote to $GITHUB_OUTPUT without a step id.

Testing

I ran the version step locally with a stubbed pnpm view for these cases: a release tag, a v tag, no tag (patch bump), an input version that's already published (fails), and an invalid tag (fails).

Releases still publish only resora. Publishing @resora/plugin-clear-router still uses a manual run.

@3m1n3nc3 3m1n3nc3 self-assigned this Nov 5, 2026
@3m1n3nc3
3m1n3nc3 merged commit 68d11fe into main Nov 5, 2026
3 checks passed
@3m1n3nc3
3m1n3nc3 deleted the fix/publish-release-version branch November 5, 2026 13:05
@codecov

codecov Bot commented Nov 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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