From ce9c52194561e2c7482753e5193cf1f5ab00900e Mon Sep 17 00:00:00 2001 From: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com> Date: Mon, 4 Aug 2025 14:22:13 +0300 Subject: [PATCH] chore: add release-check CI to check if we are in release mode --- .github/workflows/release-check.yml | 36 +++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/release-check.yml diff --git a/.github/workflows/release-check.yml b/.github/workflows/release-check.yml new file mode 100644 index 00000000..a47f8e1f --- /dev/null +++ b/.github/workflows/release-check.yml @@ -0,0 +1,36 @@ +name: Release Check + +on: + pull_request: + branches: + - main + +jobs: + check-release-mode: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + 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 + echo "❌ ERROR: This branch is in 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 + + echo "✅ Not in pre-release mode - PR can be merged"