Skip to content

fix: trigger publish workflow only on v*.*.* tags#7

Closed
Copilot wants to merge 2 commits intodevelopfrom
copilot/sub-pr-6
Closed

fix: trigger publish workflow only on v*.*.* tags#7
Copilot wants to merge 2 commits intodevelopfrom
copilot/sub-pr-6

Conversation

Copy link

Copilot AI commented Mar 9, 2026

Summary

  • publish.yml was triggering on every push to master, then hard-failing if HEAD had no tag — causing noisy failed runs on every normal merge.

Why

  • Publishing should only occur on explicit version tag pushes, not on all merges to master. The previous approach of failing after triggering is wasteful and misleading.

Changes

  • Trigger: Replaced on.push.branches: [master] with on.push.tags: ["v*.*.*"] — workflow now fires only when a version tag is pushed.
  • Removed: "Validate tag exists on this push" shell step — no longer needed since the trigger itself enforces the tag requirement.
  • Removed: fetch-depth: 0 from checkout — was only needed by git describe in the deleted validation step.
# Before
on:
  push:
    branches:
      - master

# After
on:
  push:
    tags:
      - "v*.*.*"

Checklist

  • Added/updated tests (if behavior changed)
  • npm run lint passes
  • npm run typecheck passes
  • npm test passes
  • npm run build passes
  • Added a changeset (npx changeset) if this affects consumers

Notes

  • workflow_dispatch is preserved so maintainers can still trigger a publish manually if needed.

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI mentioned this pull request Mar 9, 2026
6 tasks
…ag validation step

Co-authored-by: y-aithnini <241273478+y-aithnini@users.noreply.github.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 9, 2026

Copilot AI changed the title [WIP] Address feedback from review on PR #6 fix: trigger publish workflow only on v*.*.* tags Mar 9, 2026
@y-aithnini y-aithnini closed this Mar 11, 2026
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