Skip to content

ci(npm-publish): trigger on release published, not v* tags#104

Merged
cevheri merged 1 commit into
mainfrom
fix/npm-publish-on-release
Jun 29, 2026
Merged

ci(npm-publish): trigger on release published, not v* tags#104
cevheri merged 1 commit into
mainfrom
fix/npm-publish-on-release

Conversation

@cevheri

@cevheri cevheri commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Problem

npm-publish.yml only triggered on push: tags: ['v*'], but the release tag convention switched to plain 0.9.x (e.g. 0.9.30, 0.9.32, 0.9.36). Plain tags don't match v*, so recent releases never auto-published to npm — each needed a manual workflow_dispatch.

Fix

Trigger on the GitHub release published event instead of a tag-name filter. This is independent of whether the tag is v0.9.x or 0.9.x, so it can't drift from the tag convention again. The tag-push trigger is dropped (avoids double-firing, since creating a release also creates a tag); workflow_dispatch stays as a manual fallback.

The job body is unchanged and already compatible:

  • Version comes from the release commit's package.json (no tag/ref parsing).
  • Set version / dry_run steps are gated on inputs.*, which are empty on a release event, so a published release runs a normal publish with the package.json version.

Note

This only affects future releases. 0.9.36 is already published (its release event predates this change), so it still needs a one-time manual workflow_dispatch to reach npm.

The tag convention switched to plain '0.9.x' but the workflow still filtered
'v*', so plain-tagged releases never auto-published. Trigger on the GitHub
release 'published' event instead, which is independent of tag naming. The
release commit's package.json remains the version source; workflow_dispatch
stays as a manual fallback.
@sonarqubecloud

Copy link
Copy Markdown

@cevheri cevheri merged commit 37fd7b2 into main Jun 29, 2026
11 checks passed
@cevheri cevheri requested a review from Copilot June 29, 2026 09:19
@cevheri cevheri deleted the fix/npm-publish-on-release branch June 29, 2026 09:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the npm publish workflow trigger so releases publish to npm automatically even when the repo’s tag naming convention is plain 0.9.x instead of v0.9.x.

Changes:

  • Switch npm-publish.yml from push.tags: ['v*'] to on: release with types: [published].
  • Keep workflow_dispatch as a manual fallback (workflow body otherwise unchanged).

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

Comment on lines 7 to +9
on:
push:
tags:
- 'v*'
release:
types: [published]
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