Skip to content

Commit 102253f

Browse files
committed
Add zstd archive to tagged releases
zstd archive helps with running tests on space constrained systems. It's already supported in LAVA and tuxlava (template renderer). This patch will make it possible to use qcom-linux-testkit in tuxlava. Signed-off-by: Milosz Wasilewski <milosz.wasilewski@oss.qualcomm.com>
1 parent 0d12ca5 commit 102253f

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

.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)