Skip to content

Commit 50069aa

Browse files
committed
feat(deploy): manual trigger
1 parent 8a02b18 commit 50069aa

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

.github/workflows/auto-release.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ on:
88
paths:
99
- 'docs/CHANGELOG.md'
1010

11+
# When triggered manually, make sure that CHANGELOG.md contains the set version
12+
workflow_dispatch:
13+
inputs:
14+
release_version:
15+
description: 'Version to release (e.g., v1.0.0)'
16+
required: false
17+
1118
jobs:
1219
release:
1320
runs-on: ubuntu-latest
@@ -20,6 +27,13 @@ jobs:
2027
- name: Parse commit message to get version
2128
id: parse_commit
2229
run: |
30+
# If the workflow is triggered manually, use the provided version if available
31+
if [[ -n "${{ github.event.inputs.release_version }}" ]]; then
32+
VERSION="${{ github.event.inputs.release_version }}"
33+
echo "RELEASE_VERSION=$VERSION" >> "$GITHUB_OUTPUT"
34+
exit 0
35+
fi
36+
2337
# Commit message must be in the format of
2438
# "chore: release vX.X"
2539
VERSION=$(echo "$COMMIT_MESSAGE" | grep -oP '^chore:\ release\ v[a-zA-Z0-9.\-\+]+' | head -n 1 | cut -d' ' -f3)

0 commit comments

Comments
 (0)