diff --git a/.gitea/workflows/auto-release.yml b/.gitea/workflows/auto-release.yml index 9e58767e..0bc7775a 100644 --- a/.gitea/workflows/auto-release.yml +++ b/.gitea/workflows/auto-release.yml @@ -117,8 +117,8 @@ jobs: echo "Version: $VERSION (patch — platform version + badges only)" fi - # -- STEP 1b: Bump major version (stable = major bump, reset minor+patch) - - - name: "Step 1b: Bump major version for stable release" + # -- STEP 1b: Bump minor version (stable = minor bump, reset patch) ------ + - name: "Step 1b: Bump minor version for stable release" if: steps.version.outputs.skip != 'true' id: bump run: | @@ -126,14 +126,19 @@ jobs: [ -z "$CURRENT" ] && { echo "skip=true" >> "$GITHUB_OUTPUT"; exit 0; } MAJOR=$((10#$(echo "$CURRENT" | cut -d. -f1))) + MINOR=$((10#$(echo "$CURRENT" | cut -d. -f2))) - # Major bump, reset minor and patch - MAJOR=$((MAJOR + 1)) + # Minor bump, reset patch. Rollover if minor > 99 + MINOR=$((MINOR + 1)) + if [ $MINOR -gt 99 ]; then + MINOR=0 + MAJOR=$((MAJOR + 1)) + fi - VERSION=$(printf "%02d.00.00" $MAJOR) + VERSION=$(printf "%02d.%02d.00" $MAJOR $MINOR) TODAY=$(date +%Y-%m-%d) - echo "Stable bump: ${CURRENT} → ${VERSION} (major)" + echo "Stable bump: ${CURRENT} → ${VERSION} (minor)" # Update README.md sed -i "s/VERSION:[[:space:]]*${CURRENT}/VERSION: ${VERSION}/" README.md @@ -152,7 +157,7 @@ jobs: git remote set-url origin "https://jmiller:${{ secrets.GA_TOKEN }}@git.mokoconsulting.tech/${{ github.repository }}.git" git add -A git diff --cached --quiet || { - git commit -m "chore(version): bump ${CURRENT} → ${VERSION} (major) [skip ci]" + git commit -m "chore(version): bump ${CURRENT} → ${VERSION} (minor) [skip ci]" git push origin HEAD:main 2>&1 }