Skip to content

Commit 21f2567

Browse files
committed
ci: switch from subject-checksums to subject-path for attestation
1 parent 6378f68 commit 21f2567

File tree

3 files changed

+2
-29
lines changed

3 files changed

+2
-29
lines changed

.github/actions/build/action.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,9 @@
11
name: Build distribution files
22
description: 'Build distribution files'
3-
outputs:
4-
package-hashes:
5-
description: "base64-encoded sha256 hashes of distribution files"
6-
value: ${{ steps.package-hashes.outputs.package-hashes }}
73

84
runs:
95
using: composite
106
steps:
117
- name: Build distribution files
128
shell: bash
139
run: poetry build
14-
- name: Hash build files for provenance
15-
id: package-hashes
16-
shell: bash
17-
working-directory: ./dist
18-
run: |
19-
echo "package-hashes=$(sha256sum * | base64 -w0)" >> "$GITHUB_OUTPUT"

.github/workflows/manual-publish.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ jobs:
1919
id-token: write
2020
contents: read
2121
attestations: write # Needed for artifact attestations
22-
outputs:
23-
package-hashes: ${{ steps.build.outputs.package-hashes}}
2422
steps:
2523
- uses: actions/checkout@v4
2624

@@ -46,15 +44,8 @@ jobs:
4644
with:
4745
password: ${{env.PYPI_AUTH_TOKEN}}
4846

49-
- name: Generate checksums file
50-
if: ${{ !inputs.dry_run }}
51-
env:
52-
HASHES: ${{ steps.build.outputs.package-hashes }}
53-
run: |
54-
echo "$HASHES" | base64 -d > checksums.txt
55-
5647
- name: Attest build provenance
5748
if: ${{ !inputs.dry_run }}
5849
uses: actions/attest@v4
5950
with:
60-
subject-checksums: checksums.txt
51+
subject-path: 'dist/*'

.github/workflows/release-please.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ jobs:
1515
outputs:
1616
release-created: ${{ steps.release.outputs.release_created }}
1717
upload-tag-name: ${{ steps.release.outputs.tag_name }}
18-
package-hashes: ${{ steps.build.outputs.package-hashes}}
1918
steps:
2019
- uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4.4.0
2120
id: release
@@ -54,15 +53,8 @@ jobs:
5453
with:
5554
password: ${{env.PYPI_AUTH_TOKEN}}
5655

57-
- name: Generate checksums file
58-
if: ${{ steps.release.outputs.releases_created == 'true' }}
59-
env:
60-
HASHES: ${{ steps.build.outputs.package-hashes }}
61-
run: |
62-
echo "$HASHES" | base64 -d > checksums.txt
63-
6456
- name: Attest build provenance
6557
if: ${{ steps.release.outputs.releases_created == 'true' }}
6658
uses: actions/attest@v4
6759
with:
68-
subject-checksums: checksums.txt
60+
subject-path: 'dist/*'

0 commit comments

Comments
 (0)