Add workflow_dispatch fallback for tag-triggered releases
GitHub Actions has a known issue where tag pushes sometimes don't trigger workflows. Add workflow_dispatch as a backup trigger that accepts a tag parameter. This allows manual triggering if automatic tag push trigger fails.
This commit is contained in:
parent
c5ca86ac04
commit
739d1a1d4e
1 changed files with 13 additions and 1 deletions
14
.github/workflows/release.yml
vendored
14
.github/workflows/release.yml
vendored
|
|
@ -4,6 +4,12 @@ on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v*.*.*'
|
- 'v*.*.*'
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
tag:
|
||||||
|
description: 'Tag to release (e.g., v4.30.0) - only needed if tag push didnt trigger automatically'
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
extract-version:
|
extract-version:
|
||||||
|
|
@ -16,7 +22,13 @@ jobs:
|
||||||
- name: Extract version from tag
|
- name: Extract version from tag
|
||||||
id: extract
|
id: extract
|
||||||
run: |
|
run: |
|
||||||
TAG="${GITHUB_REF#refs/tags/}"
|
# Handle both tag push and manual dispatch
|
||||||
|
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
|
||||||
|
TAG="${{ inputs.tag }}"
|
||||||
|
else
|
||||||
|
TAG="${GITHUB_REF#refs/tags/}"
|
||||||
|
fi
|
||||||
|
|
||||||
VERSION="${TAG#v}"
|
VERSION="${TAG#v}"
|
||||||
echo "tag=${TAG}" >> $GITHUB_OUTPUT
|
echo "tag=${TAG}" >> $GITHUB_OUTPUT
|
||||||
echo "version=${VERSION}" >> $GITHUB_OUTPUT
|
echo "version=${VERSION}" >> $GITHUB_OUTPUT
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue