Skip to content

ci(release): use --tag next for prereleases#10

Merged
cubehouse merged 1 commit intomainfrom
ci/dist-tag-prereleases
Apr 15, 2026
Merged

ci(release): use --tag next for prereleases#10
cubehouse merged 1 commit intomainfrom
ci/dist-tag-prereleases

Conversation

@cubehouse
Copy link
Copy Markdown
Member

Modern npm requires prereleases to use an explicit dist-tag. Parse the git-tag version and pick next/latest accordingly.

Modern npm rejects publishing prerelease versions without an explicit
--tag, because tagging an `x.y.z-alpha.N` as `latest` would break
`npm install themeparks` for existing users. Parse the version from
the git tag and pick the dist-tag accordingly:
- Prerelease (contains a "-") -> --tag next
- Stable release -> default (latest)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 15, 2026 13:07
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the npm release GitHub Action to publish prerelease versions under a non-latest dist-tag, matching modern npm’s expectation that prereleases use an explicit tag.

Changes:

  • Adds a Publish step that derives the version from the pushed git tag (GITHUB_REF_NAME).
  • Publishes prereleases (versions containing -) with npm publish --tag next; otherwise publishes normally (default latest).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cubehouse cubehouse merged commit 47d2305 into main Apr 15, 2026
7 checks passed
@cubehouse cubehouse deleted the ci/dist-tag-prereleases branch April 15, 2026 13:29
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