Skip to content

fix: add tag for pre release (@next) vs release (@latest)#491

Open
lwasser wants to merge 1 commit intoall-contributors:mainfrom
lwasser:fix-tag-rc
Open

fix: add tag for pre release (@next) vs release (@latest)#491
lwasser wants to merge 1 commit intoall-contributors:mainfrom
lwasser:fix-tag-rc

Conversation

@lwasser
Copy link
Member

@lwasser lwasser commented Mar 9, 2026

Phew, so the node also requires a tag when publishing a prerelease to avoid defaulting to latest, which we don't want. so this cleans up a few things

✅ The build triggers on both a release and a prerelease. (it was triggering twice previously)
✅ Then the action figures out if this is a prerelease, publish, but add the tag "next" otherwise latest

NPM is recognizing the handshake now so it's just a matter of getting the tags right (i think).

What:

Why:

How:

Checklist:

  • Documentation
  • Tests
  • Ready to be merged
  • Added myself to contributors table

workflow_dispatch:
release:
types: [published, prereleased]
types: [released, prereleased]
Copy link
Member Author

Choose a reason for hiding this comment

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

Avoid two build runs.

- name: Publish to NPM via trusted publishing (tag next if prerelease)
run: |
if [[ "${{ github.event.release.prerelease }}" == "true" ]]; then
npm publish --provenance --tag next
Copy link
Member Author

Choose a reason for hiding this comment

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

Only if an prerelease is created, add a tag.

@lwasser lwasser requested a review from jdalrymple March 11, 2026 03:06
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