Skip to content

Publish pre-release versions under the next dist-tag - #62

Merged
tequdev merged 1 commit into
Xahau:mainfrom
tequdev:ci/prerelease-publish
Oct 19, 2026
Merged

tequdev merged 1 commit into
Xahau:mainfrom
tequdev:ci/prerelease-publish

Conversation

@tequdev

@tequdev tequdev commented Oct 19, 2026

Copy link
Copy Markdown
Member

Summary

npm-publish.yml currently runs npm publish without --tag, so publishing a pre-release version such as 3.0.0-alpha.1 would make it the latest dist-tag and npm install @xahau/hooks-cli would start installing the alpha. The GitHub release would also be created as a normal release.

This change detects a pre-release suffix in package.json version and:

  • publishes it with --tag next (stable versions keep --tag latest)
  • creates the GitHub release with --prerelease
  • documents this in the version input description

Stable releases are unaffected.

Usage

Set "version": "3.0.0-alpha.1" in package.json, run the workflow with that version, then install with npm install @xahau/hooks-cli@next or @xahau/hooks-cli@3.0.0-alpha.1.

Verification

  • actionlint passes (the first draft used an unquoted $FLAG expansion and was rewritten to a bash array to clear SC2086).
  • The detection snippet was run locally for 3.0.0-alpha.1, 3.0.0 and v3.0.0-rc.0 and yields next/latest as expected.

A version containing a pre-release suffix (e.g. 3.0.0-alpha.1) is now
published with --tag next instead of the default latest tag, so a plain
npm install keeps resolving to the stable release. The matching GitHub
release is marked as a pre-release.
@tequdev
tequdev merged commit b2936b4 into Xahau:main Oct 19, 2026
8 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