Skip to content

Commit 28c6b2a

Browse files
committed
ci: post-release-templates always use latest tag with workflow_dispatch
1 parent a11243e commit 28c6b2a

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

.github/workflows/post-release-templates.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ on:
55
types:
66
- published
77
workflow_dispatch:
8-
inputs:
9-
tag:
10-
description: 'Release tag to process (optional)'
11-
required: true
128

139
env:
1410
NODE_VERSION: 22.6.0
@@ -64,12 +60,15 @@ jobs:
6460
- name: Determine Release Tag
6561
id: determine_tag
6662
run: |
67-
if [ "${{ github.event.inputs.tag }}" != "" ]; then
68-
echo "Using tag from input: ${{ github.event.inputs.tag }}"
69-
echo "release_tag=${{ github.event.inputs.tag }}" >> "$GITHUB_OUTPUT"
70-
else
63+
if [ "${{ github.event.release.tag_name }}" != "" ]; then
7164
echo "Using tag from release event: ${{ github.event.release.tag_name }}"
7265
echo "release_tag=${{ github.event.release.tag_name }}" >> "$GITHUB_OUTPUT"
66+
else
67+
# pull latest tag from github, must match any version except v2. Should match v3, v4, v99, etc.
68+
echo "Fetching latest tag from github..."
69+
LATEST_TAG=$(git describe --tags --abbrev=0 --match 'v[0-9]*' --exclude 'v2*')
70+
echo "Latest tag: $LATEST_TAG"
71+
echo "release_tag=$LATEST_TAG" >> "$GITHUB_OUTPUT"
7372
fi
7473
7574
- name: Commit and push changes

0 commit comments

Comments
 (0)