Skip to content

Commit fcb0a2a

Browse files
committed
Generate artifact attestation
1 parent 8c25fad commit fcb0a2a

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

.github/workflows/build.yml

+10-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
}
5656
EOF
5757
cd dart-sdk/sdk
58-
./tools/sdks/dart-sdk/bin/dart run /tmp/version.dart | tee -a $GITHUB_OUTPUT
58+
./tools/sdks/dart-sdk/bin/dart run /tmp/version.dart | tee -a "$GITHUB_OUTPUT"
5959
6060
- name: Fetch Checked-in Dart SDK
6161
run: |
@@ -89,6 +89,10 @@ jobs:
8989

9090
runs-on: ubuntu-latest
9191

92+
permissions:
93+
id-token: write
94+
attestations: write
95+
9296
container:
9397
image: docker.io/library/alpine
9498

@@ -151,6 +155,11 @@ jobs:
151155
run: |
152156
tar -czf dartsdk-linux-${{ matrix.target-arch }}-release.tar.gz -C dart-sdk/sdk/out/Release* -- dart-sdk
153157
158+
- name: Generate artifact attestation
159+
uses: actions/attest-build-provenance@v2
160+
with:
161+
subject-path: dartsdk-linux-${{ matrix.target-arch }}-release.tar.gz
162+
154163
- name: Upload Artifact
155164
uses: actions/upload-artifact@v4
156165
with:

.github/workflows/release.yml

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77

88
jobs:
99
build:
10+
permissions:
11+
id-token: write
12+
attestations: write
1013
uses: ./.github/workflows/build.yml
1114
with:
1215
ref: ${{ github.ref_name }}

.github/workflows/schedule.yml

+12
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ jobs:
5858
stable:
5959
needs: [latest]
6060
if: needs.latest.outputs.stable-cache-hit != 'true'
61+
permissions:
62+
id-token: write
63+
attestations: write
6164
uses: ./.github/workflows/build.yml
6265
with:
6366
ref: ${{ needs.latest.outputs.stable-version }}
@@ -66,6 +69,9 @@ jobs:
6669
beta:
6770
needs: [latest]
6871
if: needs.latest.outputs.beta-cache-hit != 'true' && needs.latest.outputs.beta-version != needs.latest.outputs.stable-version
72+
permissions:
73+
id-token: write
74+
attestations: write
6975
uses: ./.github/workflows/build.yml
7076
with:
7177
ref: ${{ needs.latest.outputs.beta-version }}
@@ -74,13 +80,19 @@ jobs:
7480
dev:
7581
needs: [latest]
7682
if: needs.latest.outputs.dev-cache-hit != 'true' && needs.latest.outputs.dev-version != needs.latest.outputs.beta-version && needs.latest.outputs.dev-version != needs.latest.outputs.stable-version
83+
permissions:
84+
id-token: write
85+
attestations: write
7786
uses: ./.github/workflows/build.yml
7887
with:
7988
ref: ${{ needs.latest.outputs.dev-version }}
8089
secrets: inherit
8190

8291
edge:
8392
needs: [latest]
93+
permissions:
94+
id-token: write
95+
attestations: write
8496
uses: ./.github/workflows/build.yml
8597
with:
8698
ref: ${{ needs.latest.outputs.edge-version }}

0 commit comments

Comments
 (0)