Skip to content

ci(release): restrict tag trigger to semver-only#5

Merged
Changsik00 merged 1 commit into
mainfrom
ci/release-trigger-semver-only
May 17, 2026
Merged

ci(release): restrict tag trigger to semver-only#5
Changsik00 merged 1 commit into
mainfrom
ci/release-trigger-semver-only

Conversation

@Changsik00
Copy link
Copy Markdown
Owner

Why

To support the moving major tag convention (uses: Changsik00/node-settings@v1), we need to push a v1 tag — but the current release.yml triggers on any v* tag.

If we push v1 today:

  • It triggers release.yml
  • Workflow tries npm publish for version 1.0.0 (already published) → fails
  • Spurious red workflow run, no actual damage but ugly

Fix

Tighten the tag pattern to full semver:

on:
  push:
    tags:
      - 'v[0-9]+.[0-9]+.[0-9]+'    # was 'v*'

Movable major tags (v1, v2, …) no longer trigger the publish workflow. True semver tags continue to work exactly as before.

Test plan

  • git push origin v1 (after this merges) — should not trigger any workflow run.
  • Future pnpm release X.Y.Z continues to fire release.yml normally.
  • workflow_dispatch re-publish path unchanged.

The previous 'v*' pattern would trigger this workflow on moving
major tags (v1, v2 …) that Action consumers track via
'uses: Changsik00/node-settings@v1'. Re-publishing the same npm
version from a moved major tag would fail noisily ('cannot publish
over existing version'), and the GitHub Release that softprops
creates would shadow the real semver release.

Restrict to 'v[0-9]+.[0-9]+.[0-9]+' so only true releases publish,
and movable major tags can be re-pointed without side effects.
@Changsik00 Changsik00 merged commit 5f059dd into main May 17, 2026
9 checks passed
@Changsik00 Changsik00 deleted the ci/release-trigger-semver-only branch May 17, 2026 02:28
Changsik00 added a commit that referenced this pull request May 17, 2026
Adds the Unreleased entries that pnpm release 1.0.1 will promote
into the 1.0.1 section:

- The Marketplace listing for action.yml (functionally a re-release
  of v1.0.0 — Action behaviour unchanged).
- The release.yml tag-trigger tightening that landed in PR #5
  (semver-only filter, so movable major tags no longer trigger a
  duplicate npm publish).
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