Skip to content

fix(ci): validate release workflow version input#86

Closed
BunsDev wants to merge 1 commit into
mainfrom
pr-40-release-version-validation
Closed

fix(ci): validate release workflow version input#86
BunsDev wants to merge 1 commit into
mainfrom
pr-40-release-version-validation

Conversation

@BunsDev

@BunsDev BunsDev commented Jun 15, 2026

Copy link
Copy Markdown
Member

Add validation for the version input in the release workflow to catch malformed tags early.

Originally a local review patch. Opened as draft PR for review.

@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Error Error Jun 15, 2026 6:42am

@BunsDev BunsDev marked this pull request as ready for review June 15, 2026 07:58
Copilot AI review requested due to automatic review settings June 15, 2026 07:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds early validation for the workflow_dispatch version input in the Release workflow, and standardizes use of a RELEASE_VERSION env var throughout the workflow to reduce repetition and prevent malformed tags from progressing through the pipeline.

Changes:

  • Introduces a RELEASE_VERSION workflow env var derived from inputs.version.
  • Adds a preflight step to validate the version string format before running other release steps.
  • Sets persist-credentials: false on checkout steps and switches downstream tag usage to RELEASE_VERSION.

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

Comment on lines +40 to +42
if [[ ! "$RELEASE_VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?$ ]]; then
echo "::error::Version must be a v-prefixed SemVer tag, for example v0.1.0."
exit 1
Comment on lines +54 to 56
if git ls-remote --exit-code --tags origin "refs/tags/$RELEASE_VERSION" >/dev/null 2>&1; then
echo "::error::Tag $RELEASE_VERSION already exists"
exit 1
@BunsDev

BunsDev commented Jun 15, 2026

Copy link
Copy Markdown
Member Author

Closing — all changes from this PR (version input validation, RELEASE_VERSION env var, persist-credentials: false) are already present in main. The Vercel check failure is also a non-issue for this Rust CLI repo. Work is complete.

@BunsDev BunsDev closed this Jun 15, 2026
@BunsDev BunsDev deleted the pr-40-release-version-validation branch June 15, 2026 08:15
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