fix: skip auto-bump on main (branch protection blocks push)
Some checks failed
Repo Health / Access control (push) Successful in 1s
Repo Health / Release configuration (push) Failing after 3s
Repo Health / Scripts governance (push) Successful in 3s
Repo Health / Repository health (push) Failing after 3s

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jonathan Miller
2026-04-21 16:28:17 -05:00
parent 495886b29e
commit 67fbdad5c4

View File

@@ -103,6 +103,17 @@ jobs:
INPUT_STABILITY: ${{ steps.meta.outputs.stability }} INPUT_STABILITY: ${{ steps.meta.outputs.stability }}
INPUT_SUFFIX: ${{ steps.meta.outputs.suffix }} INPUT_SUFFIX: ${{ steps.meta.outputs.suffix }}
run: | run: |
BRANCH="${{ github.ref_name }}"
# Skip auto-bump on main — version is already set before merge
if [ "$BRANCH" = "main" ]; then
CURRENT=$(sed -n 's/.*VERSION:[[:space:]]*\([0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\).*/\1/p' README.md 2>/dev/null | head -1)
echo "On main — using current version ${CURRENT} (no bump)"
echo "version=${CURRENT}" >> "$GITHUB_OUTPUT"
echo "zip_name=${EXT_ELEMENT}-${CURRENT}${INPUT_SUFFIX}.zip" >> "$GITHUB_OUTPUT"
exit 0
fi
# Read current version from README.md # Read current version from README.md
CURRENT=$(sed -n 's/.*VERSION:[[:space:]]*\([0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\).*/\1/p' README.md 2>/dev/null | head -1) CURRENT=$(sed -n 's/.*VERSION:[[:space:]]*\([0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\).*/\1/p' README.md 2>/dev/null | head -1)
if [ -z "$CURRENT" ]; then if [ -z "$CURRENT" ]; then