Skip to content

Commit 07b9e22

Browse files
authored
Merge pull request qualcomm-linux#122 from smuppand/main
ci(zstd): update workflow to use glob tag matching and support manual dispatch
2 parents 72c68ac + 782d1a4 commit 07b9e22

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/zstd.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@ name: Zstd Archive Release
33
on:
44
push:
55
tags:
6-
- 'v[0-9]+.[0-9]+.[0-9]+' # Matching tags like v1.1.0
6+
- 'v*.*.*' # match v1.2.3, v10.20.30, etc.
7+
workflow_dispatch: # allow manual runs
78

89
jobs:
910
release:
1011
runs-on: ubuntu-latest
12+
1113
steps:
1214
- name: Checkout repository
1315
uses: actions/checkout@v4
@@ -18,13 +20,18 @@ jobs:
1820
- name: Extract version info
1921
id: version
2022
run: |
21-
TAG_NAME="${GITHUB_REF#refs/tags/}"
23+
TAG_NAME="${GITHUB_REF#refs/tags/}" # e.g. v1.2.3
24+
SHORT_TAG="${TAG_NAME#v}" # strip leading "v" → 1.2.3
2225
echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT
26+
echo "short_tag=$SHORT_TAG" >> $GITHUB_OUTPUT
2327
2428
- name: Create .tar.zst archives using git archive
2529
run: |
2630
git archive --format=tar --prefix=test-definitions/ ${{ steps.version.outputs.tag_name }} \
2731
| zstd -o ../${{ steps.version.outputs.tag_name }}.tar.zst
32+
git archive --format=tar --prefix=test-definitions/ ${{ steps.version.outputs.tag_name }} \
33+
| zstd -o ../${{ steps.version.outputs.short_tag }}.tar.zst
34+
2835
- name: Upload .tar.zst archives to GitHub Release
2936
uses: softprops/action-gh-release@v2
3037
with:
@@ -35,3 +42,4 @@ jobs:
3542
../${{ steps.version.outputs.short_tag }}.tar.zst
3643
env:
3744
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+

0 commit comments

Comments
 (0)