Skip to content

Commit f453a02

Browse files
committed
ci(zstd): add debug step to inspect upload URL and token length before asset upload
- Introduce “Debug upload context” step to echo the release `upload_url` and `GITHUB_TOKEN` length - Helps diagnose “Bad credentials” by verifying PAT injection and correct upload endpoint Signed-off-by: Srikanth Muppandam <[email protected]>
1 parent cf9e24b commit f453a02

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

.github/workflows/zstd.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
name: Zstd Archive Release
22

3-
# Grant the GITHUB_TOKEN write access so we can create releases & upload assets
3+
# Give the token rights to create releases & upload assets
44
permissions:
55
contents: write
66

77
on:
88
push:
9-
# Trigger on semver tags like v1.2.3
9+
# Only run on semver-style tags like v1.2.3
1010
tags:
1111
- 'v*.*.*'
12-
workflow_dispatch: # allow manual runs
12+
workflow_dispatch: # (Optional) allows manual runs
1313

1414
jobs:
1515
release:
@@ -27,7 +27,7 @@ jobs:
2727
- name: Extract version info
2828
id: version
2929
run: |
30-
TAG="${GITHUB_REF#refs/tags/}" # e.g. v1.2.3
30+
TAG="${GITHUB_REF#refs/tags/}" # e.g. v1.2.3
3131
echo "tag_name=$TAG" >> $GITHUB_OUTPUT
3232
3333
- name: Create .tar.zst archive
@@ -41,8 +41,7 @@ jobs:
4141
id: create_release
4242
uses: actions/create-release@v1
4343
env:
44-
# use your PAT stored in 'PAT' secret
45-
GITHUB_TOKEN: ${{ secrets.PAT }}
44+
GITHUB_TOKEN: ${{ secrets.PAT }} # inject PAT here
4645
with:
4746
tag_name: ${{ steps.version.outputs.tag_name }}
4847
release_name: Release ${{ steps.version.outputs.tag_name }}
@@ -51,10 +50,10 @@ jobs:
5150

5251
- name: Upload .tar.zst to GitHub Release
5352
uses: actions/upload-release-asset@v1
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.PAT }} # inject PAT here
5455
with:
5556
upload_url: ${{ steps.create_release.outputs.upload_url }}
5657
asset_path: ${{ github.workspace }}/${{ steps.version.outputs.tag_name }}.tar.zst
5758
asset_name: ${{ steps.version.outputs.tag_name }}.tar.zst
5859
asset_content_type: application/zstd
59-
# pass the same PAT for authentication
60-
token: ${{ secrets.PAT }}

0 commit comments

Comments
 (0)