Skip to content

Commit 7025397

Browse files
authored
fix: shasum generation for macos artifacts + uploading provenance to Github release (#238)
`shasum` has different parameters in MacOS vs Linux/Windows: ``` Run echo "hashes-macos=$(sha256sum mac-clang-x64-static.zip mac-clang-x64-dynamic.zip | base64 -w0)" >> "$GITHUB_OUTPUT" /Users/runner/work/_temp/8965ab70-9f6a-4960-9224-3651a6a4797a.sh: line 1: sha256sum: command not found base64: invalid option -- w Usage: base64 [-hvDd] [-b num] [-i in_file] [-o out_file] ``` Changing this to `base64 -b 0` should fix it and get the intended result
2 parents d5ed567 + c422bd9 commit 7025397

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

.github/actions/sdk-release/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ runs:
185185
shell: bash
186186
id: hash-macos
187187
run: |
188-
echo "hashes-macos=$(sha256sum mac-clang-x64-static.zip mac-clang-x64-dynamic.zip | base64 -w0)" >> "$GITHUB_OUTPUT"
188+
echo "hashes-macos=$(sha256sum mac-clang-x64-static.zip mac-clang-x64-dynamic.zip | base64 -b 0)" >> "$GITHUB_OUTPUT"
189189
190190
- name: Upload Mac Build Artifacts
191191
if: runner.os == 'macOS'

.github/workflows/manual-sdk-release-artifacts.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,5 @@ jobs:
6767
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected]
6868
with:
6969
base64-subjects: "${{ needs.release-sdk.outputs[format('hashes-{0}', matrix.os)] }}"
70+
upload-assets: true
71+
upload-tag-name: ${{ inputs.tag }}

.github/workflows/release-please.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,5 @@ jobs:
5555
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected]
5656
with:
5757
base64-subjects: "${{ needs.release-client.outputs[format('hashes-{0}', matrix.os)] }}"
58+
upload-assets: true
59+
upload-tag-name: ${{ needs.release-please.outputs.package-client-tag }}

0 commit comments

Comments
 (0)