Skip to content

Commit 6665c21

Browse files
committed
fix(ci): bump-docs-version workflow for manual trigger
1 parent 43e4180 commit 6665c21

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/bump-docs-version.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@ jobs:
2020
ref: main
2121
token: ${{ secrets.GITHUB_TOKEN }}
2222

23-
- name: Extract version from release tag
23+
- name: Extract version from release tag or latest release
2424
id: extract_version
2525
run: |
26-
VERSION="${{ github.event.release.tag_name }}"
26+
if [ "${{ github.event_name }}" = "release" ]; then
27+
VERSION="${{ github.event.release.tag_name }}"
28+
else
29+
VERSION=$(curl -s "https://api.github.com/repos/${{ github.repository }}/releases/latest" | jq -r '.tag_name')
30+
fi
2731
echo "version=$VERSION" >> $GITHUB_OUTPUT
2832
echo "Extracted version: $VERSION"
2933

0 commit comments

Comments
 (0)