Skip to content

Commit 72c68ac

Browse files
authored
Merge pull request #105 from mwasilew/release-zstd
Add zstd archive to tagged releases
2 parents 0b5d835 + 102253f commit 72c68ac

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/zstd.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Zstd Archive Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v[0-9]+.[0-9]+.[0-9]+' # Matching tags like v1.1.0
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
15+
- name: Install zstd
16+
run: sudo apt-get update && sudo apt-get install -y zstd
17+
18+
- name: Extract version info
19+
id: version
20+
run: |
21+
TAG_NAME="${GITHUB_REF#refs/tags/}"
22+
echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT
23+
24+
- name: Create .tar.zst archives using git archive
25+
run: |
26+
git archive --format=tar --prefix=test-definitions/ ${{ steps.version.outputs.tag_name }} \
27+
| zstd -o ../${{ steps.version.outputs.tag_name }}.tar.zst
28+
- name: Upload .tar.zst archives to GitHub Release
29+
uses: softprops/action-gh-release@v2
30+
with:
31+
tag_name: ${{ steps.version.outputs.tag_name }}
32+
name: Release ${{ steps.version.outputs.tag_name }}
33+
files: |
34+
../${{ steps.version.outputs.tag_name }}.tar.zst
35+
../${{ steps.version.outputs.short_tag }}.tar.zst
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)