Skip to content

Commit 65933e4

Browse files
authored
Merge pull request qualcomm-linux#126 from smuppand/main
ci(zstd): add workspace debug diagnostics after archive creation
2 parents e5d1e5b + f93525d commit 65933e4

File tree

1 file changed

+14
-18
lines changed

1 file changed

+14
-18
lines changed

.github/workflows/zstd.yml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
name: Zstd Archive Release
22

3+
# Grant the GITHUB_TOKEN write access so we can create releases & upload assets
4+
permissions:
5+
contents: write
6+
37
on:
48
push:
9+
# Trigger on semver tags like v1.2.3
510
tags:
611
- 'v*.*.*'
7-
workflow_dispatch:
12+
workflow_dispatch: # allow manual runs
813

914
jobs:
1015
release:
1116
runs-on: ubuntu-latest
17+
1218
steps:
1319
- name: Checkout repository
1420
uses: actions/checkout@v4
@@ -21,17 +27,15 @@ jobs:
2127
- name: Extract version info
2228
id: version
2329
run: |
24-
TAG="${GITHUB_REF#refs/tags/}"
25-
SHORT="${TAG#v}"
30+
TAG="${GITHUB_REF#refs/tags/}" # e.g. v1.2.3
2631
echo "tag_name=$TAG" >> $GITHUB_OUTPUT
27-
echo "short_tag=$SHORT" >> $GITHUB_OUTPUT
2832
29-
- name: Create .tar.zst archives
33+
- name: Create .tar.zst archive
3034
run: |
31-
git archive --format=tar --prefix=test-definitions/ "${{ steps.version.outputs.tag_name }}" \
32-
| zstd -o "$GITHUB_WORKSPACE/${{ steps.version.outputs.tag_name }}.tar.zst"
33-
git archive --format=tar --prefix=test-definitions/ "${{ steps.version.outputs.tag_name }}" \
34-
| zstd -o "$GITHUB_WORKSPACE/${{ steps.version.outputs.short_tag }}.tar.zst"
35+
git archive --format=tar \
36+
--prefix=test-definitions/ \
37+
"${{ steps.version.outputs.tag_name }}" \
38+
| zstd -o "${GITHUB_WORKSPACE}/${{ steps.version.outputs.tag_name }}.tar.zst"
3539
3640
- name: Create GitHub Release
3741
id: create_release
@@ -44,18 +48,10 @@ jobs:
4448
env:
4549
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4650

47-
- name: Upload full-tag .tar.zst
51+
- name: Upload .tar.zst to GitHub Release
4852
uses: actions/upload-release-asset@v1
4953
with:
5054
upload_url: ${{ steps.create_release.outputs.upload_url }}
5155
asset_path: ${{ github.workspace }}/${{ steps.version.outputs.tag_name }}.tar.zst
5256
asset_name: ${{ steps.version.outputs.tag_name }}.tar.zst
5357
asset_content_type: application/zstd
54-
55-
- name: Upload short-tag .tar.zst
56-
uses: actions/upload-release-asset@v1
57-
with:
58-
upload_url: ${{ steps.create_release.outputs.upload_url }}
59-
asset_path: ${{ github.workspace }}/${{ steps.version.outputs.short_tag }}.tar.zst
60-
asset_name: ${{ steps.version.outputs.short_tag }}.tar.zst
61-
asset_content_type: application/zstd

0 commit comments

Comments
 (0)