Skip to content

Commit b025f5b

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 <[email protected]>
1 parent 8e078f4 commit b025f5b

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/zstd.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Zstd Archive Release
2+
3+
on:
4+
push:
5+
tags:
6+
7+
jobs:
8+
release:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v4
13+
14+
- name: Install zstd
15+
run: sudo apt-get update && sudo apt-get install -y zstd
16+
17+
- name: Extract version info
18+
id: version
19+
run: |
20+
TAG_NAME="${GITHUB_REF#refs/tags/}"
21+
SHORT_TAG=$(echo "$TAG_NAME" | cut -d '.' -f 1,2)
22+
echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT
23+
echo "short_tag=$SHORT_TAG" >> $GITHUB_OUTPUT
24+
25+
- name: Create zstd archive without prefix
26+
run: |
27+
cd ..
28+
tar --exclude='./qcom-linux-testkit/.git' -I zstd -cf ${{ steps.version.outputs.tag_name }}.tar.zst qcom-linux-testkit
29+
cp ${{ steps.version.outputs.tag_name }}.tar.zst ${{ steps.version.outputs.short_tag }}.tar.zst
30+
31+
- name: Upload archive(s) to GitHub Release
32+
uses: softprops/action-gh-release@v2
33+
with:
34+
tag_name: ${{ steps.version.outputs.tag_name }}
35+
name: Release ${{ steps.version.outputs.tag_name }}
36+
files: |
37+
../${{ steps.version.outputs.tag_name }}.tar.zst
38+
../${{ steps.version.outputs.short_tag }}.tar.zst
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)