chore: improve release check for release-check and release flow (#1095)

* chore: improve release check for release-check and release flow

* chore: fix format
This commit is contained in:
Ralph Khreish
2025-08-06 23:19:28 +02:00
committed by GitHub
parent 4357af3f13
commit fcf14e09be
3 changed files with 104 additions and 45 deletions

View File

@@ -18,29 +18,4 @@ jobs:
fetch-depth: 0
- name: Check release mode
run: |
set -euo pipefail
echo "🔍 Checking if branch is in pre-release mode..."
if [[ -f .changeset/pre.json ]]; then
if ! PRE_MODE=$(jq -r '.mode' .changeset/pre.json 2>/dev/null); then
echo "❌ ERROR: Unable to parse .changeset/pre.json aborting merge."
exit 1
fi
if [[ "$PRE_MODE" == "pre" ]]; then
echo "❌ ERROR: This branch is in active pre-release mode!"
echo ""
echo "Pre-release mode must be exited before merging to main."
echo ""
echo "To fix this, run the following commands in your branch:"
echo " npx changeset pre exit"
echo " git add -u"
echo " git commit -m 'chore: exit pre-release mode'"
echo " git push"
echo ""
echo "Then update this pull request."
exit 1
fi
fi
echo "✅ Not in active pre-release mode - PR can be merged"
run: node ./.github/scripts/check-pre-release-mode.mjs "pull_request"