mirror of
https://github.com/Sea-Haven-Industries/afterhours-shift-manager.git
synced 2026-09-30 11:23:12 +00:00
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:
parent
55697748cb
commit
a85eb0afd9
1 changed files with 17 additions and 3 deletions
20
.github/workflows/deploy-notify.yml
vendored
20
.github/workflows/deploy-notify.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue