From 1fdd62cc412a58a3529f60c652aa7d27cd2f343c Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 12 Nov 2026 16:34:44 +0000 Subject: [PATCH] Release workflow: accept vX.Y.Z-mas.N tags - Relax tag validation regex from ^v[0-9]+\.[0-9]+\.[0-9]+$ to ^v[0-9]+\.[0-9]+\.[0-9]+(-mas\.[0-9]+)?$ in release.yml, release-trigger.yml, and publish-pypi.yml - Update error messages to include the -mas.N format - Point release notes install URL to MAS-Consultores/spec-kit fork - Update RELEASE-PROCESS.md to document -mas.N tag format - Tags with -mas.N suffix create normal (not pre-release) releases Co-authored-by: mbarrerarod --- .github/workflows/RELEASE-PROCESS.md | 5 +++-- .github/workflows/publish-pypi.yml | 4 ++-- .github/workflows/release-trigger.yml | 6 +++--- .github/workflows/release.yml | 6 +++--- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/RELEASE-PROCESS.md b/.github/workflows/RELEASE-PROCESS.md index 292345db34..2ebab39006 100644 --- a/.github/workflows/RELEASE-PROCESS.md +++ b/.github/workflows/RELEASE-PROCESS.md @@ -158,8 +158,9 @@ GitHub Release creation may finish before or after the development bump and PR c ## Version Constraints -- Tags must follow format: `v{MAJOR}.{MINOR}.{PATCH}` -- Example valid versions: `v0.1.11`, `v0.2.0`, `v1.0.0` +- Tags must follow format: `v{MAJOR}.{MINOR}.{PATCH}` or `v{MAJOR}.{MINOR}.{PATCH}-mas.{N}` +- Example valid versions: `v0.1.11`, `v0.2.0`, `v1.0.0`, `v1.4.0-mas.1` +- The `-mas.N` suffix is used for fork-specific releases and creates normal (not pre-release) GitHub releases - The release workflow rejects malformed tags before checking or creating a release, and passes the validated version to later shell steps through environment variables rather than interpolating it into shell source - Auto-increment only bumps patch version - Cannot create duplicate tags (workflow will fail) diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 67aeac261f..b2fcf52266 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -22,8 +22,8 @@ jobs: env: TAG: ${{ inputs.tag }} run: | - if [[ ! "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then - echo "Error: '$TAG' is not a valid release tag (expected vX.Y.Z)" + if [[ ! "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-mas\.[0-9]+)?$ ]]; then + echo "Error: '$TAG' is not a valid release tag (expected vX.Y.Z or vX.Y.Z-mas.N)" exit 1 fi diff --git a/.github/workflows/release-trigger.yml b/.github/workflows/release-trigger.yml index 666d85105f..2ac1e0a81a 100644 --- a/.github/workflows/release-trigger.yml +++ b/.github/workflows/release-trigger.yml @@ -34,9 +34,9 @@ jobs: if [[ -n "$INPUT_VERSION" ]]; then # Manual version specified - strip optional v prefix VERSION="${INPUT_VERSION#v}" - # Validate strict semver format to prevent injection - if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then - echo "Error: Invalid version format '$VERSION'. Must be X.Y.Z (e.g. 1.2.3 or v1.2.3)" + # Validate semver format (with optional -mas.N suffix) to prevent injection + if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-mas\.[0-9]+)?$ ]]; then + echo "Error: Invalid version format '$VERSION'. Must be X.Y.Z or X.Y.Z-mas.N (e.g. 1.2.3, v1.2.3, 1.2.3-mas.1)" exit 1 fi echo "version=$VERSION" >> $GITHUB_OUTPUT diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 508d89d180..2f887e6bfa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,8 +21,8 @@ jobs: id: version run: | VERSION=${GITHUB_REF#refs/tags/} - if [[ ! "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then - echo "Error: '$VERSION' is not a valid release tag (expected vX.Y.Z)" + if [[ ! "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-mas\.[0-9]+)?$ ]]; then + echo "Error: '$VERSION' is not a valid release tag (expected vX.Y.Z or vX.Y.Z-mas.N)" exit 1 fi echo "tag=$VERSION" >> "$GITHUB_OUTPUT" @@ -71,7 +71,7 @@ jobs: ## Install \`\`\`bash - uv tool install specify-cli --from git+https://github.com/github/spec-kit.git@${VERSION} + uv tool install specify-cli --from git+https://github.com/MAS-Consultores/spec-kit.git@${VERSION} specify init my-project \`\`\`