Skip to content

fix(PP-3449): guard release.yml against non-tag workflow_dispatch runs - #187

Merged
sergak01 merged 1 commit into
developfrom
pp-3449-release-tag-guard
Jul 2, 2026
Merged

fix(PP-3449): guard release.yml against non-tag workflow_dispatch runs#187
sergak01 merged 1 commit into
developfrom
pp-3449-release-tag-guard

Conversation

@sergak01

@sergak01 sergak01 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Addresses a CodeRabbit review comment on #186: workflow_dispatch (added in #184) lets release.yml run against any ref, not just a version tag. Without a guard, dispatching the workflow against main/develop would derive VERSION from the branch name (VERSION=${GITHUB_REF_NAME#v}) and proceed straight to build, npm version, and npm publish with a bogus version string.

Fix

Exit early with a clear error unless GITHUB_REF_NAME matches a v* tag:

if [[ "$GITHUB_REF_NAME" != v* ]]; then
  echo "This workflow must be run against a version tag (e.g. v1.0.0)."
  exit 1
fi

Manual re-runs via gh workflow run release.yml --ref v1.0.0-beta.1 are unaffected; only non-tag refs are rejected.

Testing

  • YAML syntax validated

Merge Request: origin/pp-3449-release-tag-guardorigin/develop

workflow_dispatch lets this workflow run against any ref (branch or
tag). Without a check, dispatching against main/develop would derive
VERSION from the branch name and proceed to build/bump/publish with
a bogus version. Exit early unless GITHUB_REF_NAME matches a v* tag.

Addresses CodeRabbit review comment on PR #186.
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 86d06656-4f73-4a54-b74d-d2b78a7597f3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch pp-3449-release-tag-guard

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sergak01 sergak01 self-assigned this Jul 2, 2026
@sergak01
sergak01 merged commit dbe7340 into develop Jul 2, 2026
3 checks passed
@sergak01
sergak01 deleted the pp-3449-release-tag-guard branch July 2, 2026 07:40
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