mirror of
https://github.com/Sea-Haven-Industries/afterhours-shift-manager.git
synced 2026-09-30 21:53:11 +00:00
We now apply semantic version tags deliberately (see v1.7.19–v1.9.2), so the daily auto-bump is no longer wanted. - Drop the `schedule:` cron (and the now-unneeded DST guard) — the workflow runs only on `workflow_dispatch`, with patch/minor/major options. - Remove the Slack notification entirely: the "Update changelog canvas" and "Post to Slack" steps (and the PR/bullet collection that fed them) are gone, along with their SLACK_* secret usage. - Keep the core behavior: compute the next version from the latest tag + chosen bump and push an annotated tag. Renames the workflow "Daily Version Bump" -> "Version Bump".
45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
name: Version Bump
|
|
|
|
# Manual only. Semantic version tags are applied deliberately (patch/minor/major);
|
|
# there is no daily auto-bump and no Slack notification.
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
bump:
|
|
description: "Version bump type"
|
|
type: choice
|
|
options:
|
|
- patch
|
|
- minor
|
|
- major
|
|
default: patch
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
tag:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
fetch-tags: true
|
|
|
|
- name: Compute and push next version tag
|
|
run: |
|
|
LAST_TAG=$(git tag -l 'v*' --sort=-v:refname | head -1)
|
|
LAST_TAG="${LAST_TAG:-v0.0.0}"
|
|
MAJOR=$(echo "$LAST_TAG" | sed 's/^v//' | cut -d. -f1)
|
|
MINOR=$(echo "$LAST_TAG" | sed 's/^v//' | cut -d. -f2)
|
|
PATCH=$(echo "$LAST_TAG" | sed 's/^v//' | cut -d. -f3)
|
|
|
|
case "${{ inputs.bump }}" in
|
|
major) VERSION="v$((MAJOR + 1)).0.0" ;;
|
|
minor) VERSION="v${MAJOR}.$((MINOR + 1)).0" ;;
|
|
*) VERSION="v${MAJOR}.${MINOR}.$((PATCH + 1))" ;;
|
|
esac
|
|
|
|
echo "Bumping $LAST_TAG -> $VERSION"
|
|
git tag -a "$VERSION" -m "$VERSION"
|
|
git push origin "$VERSION"
|