File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -3,11 +3,13 @@ name: Zstd Archive Release
3
3
on :
4
4
push :
5
5
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
7
8
8
9
jobs :
9
10
release :
10
11
runs-on : ubuntu-latest
12
+
11
13
steps :
12
14
- name : Checkout repository
13
15
uses : actions/checkout@v4
@@ -18,13 +20,18 @@ jobs:
18
20
- name : Extract version info
19
21
id : version
20
22
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
22
25
echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT
26
+ echo "short_tag=$SHORT_TAG" >> $GITHUB_OUTPUT
23
27
24
28
- name : Create .tar.zst archives using git archive
25
29
run : |
26
30
git archive --format=tar --prefix=test-definitions/ ${{ steps.version.outputs.tag_name }} \
27
31
| 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
+
28
35
- name : Upload .tar.zst archives to GitHub Release
29
36
uses : softprops/action-gh-release@v2
30
37
with :
35
42
../${{ steps.version.outputs.short_tag }}.tar.zst
36
43
env :
37
44
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
45
+
You can’t perform that action at this time.
0 commit comments