From 162edf39fe431ebd9c82656fa0b497f2175f2b6c Mon Sep 17 00:00:00 2001 From: Igor Lins e Silva <4753812+igorls@users.noreply.github.com> Date: Tue, 14 Apr 2026 11:34:54 -0300 Subject: [PATCH] ci: let semver pre-release tags bypass strict manifest match MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tags matching `vX.Y.Z-*` (e.g. v3.4.0-rc1, v1.0.0-beta.2) are treated as internal/staging builds. They skip the tag-vs-manifest check because pre-releases do not flow to end users via `/plugin update`, which reads the manifest on the default branch. Stable tags `vX.Y.Z` still require all five version sources to match exactly, so the protection against the #874 drift remains intact. The cross-file consistency check on PRs is unchanged — all manifests must still agree with mempalace/version.py whenever any version file moves. --- .github/workflows/version-guard.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/version-guard.yml b/.github/workflows/version-guard.yml index ea9e730..9cb30fe 100644 --- a/.github/workflows/version-guard.yml +++ b/.github/workflows/version-guard.yml @@ -77,9 +77,25 @@ jobs: run: | set -euo pipefail tag_version="${GITHUB_REF_NAME#v}" + + # Semver pre-release tags (v3.4.0-rc1, v1.0.0-beta.2, ...) are treated + # as internal/staging and are not validated against the manifest. They + # do not flow to end users via `/plugin update`, which reads the + # manifest on the default branch. + if [[ "$tag_version" == *-* ]]; then + echo "Pre-release tag $GITHUB_REF_NAME — skipping strict manifest match." + { + echo "" + echo "> Pre-release tag detected: \`$GITHUB_REF_NAME\`." + echo "> Manifest ($PY) is not required to match. Pre-releases are not published via \`/plugin update\`." + } >> "$GITHUB_STEP_SUMMARY" + exit 0 + fi + if [[ "$tag_version" != "$PY" ]]; then echo "::error::tag $GITHUB_REF_NAME does not match manifest version $PY" - echo "Bump mempalace/version.py, pyproject.toml, and all plugin manifests before tagging." + echo "Bump mempalace/version.py, pyproject.toml, and all plugin manifests before tagging a stable release." + echo "For an internal/staging tag, use a semver pre-release suffix (e.g. v${PY}-rc1)." exit 1 fi echo "Tag $GITHUB_REF_NAME matches manifest version $PY"