Default to patch version bumps, add minor bump option (#30)

Scheduled runs auto-bump patch (v1.7.0 -> v1.7.1). Manual triggers
get a dropdown to choose patch or minor bump.
This commit is contained in:
Adam Moussa 2026-05-01 15:06:04 -04:00 • committed by GitHub
parent 55697748cb
commit a85eb0afd9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5,7 +5,15 @@ on:
# 6pm ET (EDT = 22:00 UTC, EST = 23:00 UTC)
- cron: "0 22 * * *"
- cron: "0 23 * * *"
workflow_dispatch: {}
workflow_dispatch:
inputs:
bump:
description: "Version bump type"
type: choice
options:
- patch
- minor
default: patch
permissions:
contents: write
@ -62,10 +70,16 @@ jobs:
echo "has_changes=true" >> "$GITHUB_OUTPUT"
# Auto-increment minor version (v1.7.0 -> v1.8.0)
# Semver bump (default: patch)
BUMP="${{ github.event.inputs.bump || 'patch' }}"
MAJOR=$(echo "$LAST_TAG" | sed 's/^v//' | cut -d. -f1)
MINOR=$(echo "$LAST_TAG" | sed 's/^v//' | cut -d. -f2)
VERSION="v${MAJOR}.$((MINOR + 1)).0"
PATCH=$(echo "$LAST_TAG" | sed 's/^v//' | cut -d. -f3)
if [ "$BUMP" = "minor" ]; then
VERSION="v${MAJOR}.$((MINOR + 1)).0"
else
VERSION="v${MAJOR}.${MINOR}.$((PATCH + 1))"
fi
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
# Build bullet lists from PR titles