Skip to content

Commit afdd162

Browse files
author
Your Name
committed
Publish dev release with content hash
Name the asset by its SHA-256 content hash to satisfy Roc package integrity checks.
1 parent 785e145 commit afdd162

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/dev-release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ jobs:
3030
run: |
3131
tar -C platform -cvf basic-cli-dev.tar .
3232
brotli -f basic-cli-dev.tar
33+
HASH=$(sha256sum basic-cli-dev.tar.br | awk '{print $1}' | xxd -r -p | base64 | tr '+/' '-_' | tr -d '=')
34+
mv basic-cli-dev.tar.br "${HASH}.tar.br"
35+
echo "ROCPKG_HASH=${HASH}" >> $GITHUB_ENV
36+
echo "ROCPKG_ASSET=${HASH}.tar.br" >> $GITHUB_ENV
3337
3438
- name: Publish dev release
3539
uses: ncipollo/release-action@v1
@@ -39,4 +43,4 @@ jobs:
3943
prerelease: true
4044
allowUpdates: true
4145
replacesArtifacts: true
42-
artifacts: basic-cli-dev.tar.br
46+
artifacts: ${{ env.ROCPKG_ASSET }}

0 commit comments

Comments
 (0)