From 9a0345defd88fc40127b3c9a13d952709d39002a Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Tue, 21 Apr 2026 16:28:29 -0500 Subject: [PATCH] fix: skip auto-bump on main (branch protection blocks push) Co-Authored-By: Claude Opus 4.6 (1M context) --- .gitea/workflows/release.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index a5d5164..0e5e71e 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -103,6 +103,17 @@ jobs: INPUT_STABILITY: ${{ steps.meta.outputs.stability }} INPUT_SUFFIX: ${{ steps.meta.outputs.suffix }} 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 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