Correct staged release and merge gates

This commit is contained in:
vorotamoroz
2026-07-26 23:34:52 +00:00
parent 4f01e7f687
commit 866575add5
4 changed files with 100 additions and 50 deletions
+12 -2
View File
@@ -62,6 +62,7 @@ jobs:
VERSION: ${{ inputs.version }}
EXPECTED_HEAD_SHA: ${{ inputs.expected_head_sha }}
PRERELEASE: ${{ inputs.prerelease }}
PUBLISH_CLI: ${{ inputs.publish_cli }}
run: |
set -euo pipefail
ACTUAL_HEAD_SHA="$(git rev-parse HEAD)"
@@ -73,6 +74,10 @@ jobs:
echo "Version ${VERSION} is a pre-release version, but prerelease was not enabled." >&2
exit 1
fi
if [[ "${VERSION}" != *-* && "${PRERELEASE}" == "true" && "${PUBLISH_CLI}" == "true" ]]; then
echo "A stable version staged as a pre-release must use publish_cli=false so that the CLI latest and major-minor image tags do not advance before BRAT validation." >&2
exit 1
fi
node utils/release-notes.mjs validate "${VERSION}"
- name: Ensure and push release tags
@@ -120,8 +125,13 @@ jobs:
echo ""
echo "Dispatched the plug-in release workflow for \`${VERSION}\`. After approval for the release environment, it creates a draft GitHub Release."
echo ""
if [[ "${PRERELEASE}" == "true" ]]; then
echo "Publish the draft as a pre-release, keep the release pull request in draft, and merge only after BRAT validation succeeds."
if [[ "${VERSION}" == *-* ]]; then
echo "Publish the draft as a pre-release without replacing the latest stable release."
echo "Keep the release pull request in draft and unmerged after BRAT validation; close it only through a separate maintainer action."
elif [[ "${PRERELEASE}" == "true" ]]; then
echo "Publish the draft initially as a pre-release without replacing the latest stable release."
echo "After BRAT validation, remove the pre-release designation and make this exact release the latest stable release before merging the release pull request."
echo "Create the stable CLI tag and publish its latest and major-minor image tags through a separate maintainer gate."
else
echo "Publish the draft as the latest stable release, keep the release pull request in draft, and merge only after BRAT validation succeeds."
fi