Skip to content

Commit

Permalink
Generate artifact attestation
Browse files Browse the repository at this point in the history
  • Loading branch information
ntkme committed Feb 14, 2025
1 parent 8c25fad commit fcb0a2a
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
}
EOF
cd dart-sdk/sdk
./tools/sdks/dart-sdk/bin/dart run /tmp/version.dart | tee -a $GITHUB_OUTPUT
./tools/sdks/dart-sdk/bin/dart run /tmp/version.dart | tee -a "$GITHUB_OUTPUT"
- name: Fetch Checked-in Dart SDK
run: |
Expand Down Expand Up @@ -89,6 +89,10 @@ jobs:

runs-on: ubuntu-latest

permissions:
id-token: write
attestations: write

container:
image: docker.io/library/alpine

Expand Down Expand Up @@ -151,6 +155,11 @@ jobs:
run: |
tar -czf dartsdk-linux-${{ matrix.target-arch }}-release.tar.gz -C dart-sdk/sdk/out/Release* -- dart-sdk
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v2
with:
subject-path: dartsdk-linux-${{ matrix.target-arch }}-release.tar.gz

- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:

jobs:
build:
permissions:
id-token: write
attestations: write
uses: ./.github/workflows/build.yml
with:
ref: ${{ github.ref_name }}
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/schedule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ jobs:
stable:
needs: [latest]
if: needs.latest.outputs.stable-cache-hit != 'true'
permissions:
id-token: write
attestations: write
uses: ./.github/workflows/build.yml
with:
ref: ${{ needs.latest.outputs.stable-version }}
Expand All @@ -66,6 +69,9 @@ jobs:
beta:
needs: [latest]
if: needs.latest.outputs.beta-cache-hit != 'true' && needs.latest.outputs.beta-version != needs.latest.outputs.stable-version
permissions:
id-token: write
attestations: write
uses: ./.github/workflows/build.yml
with:
ref: ${{ needs.latest.outputs.beta-version }}
Expand All @@ -74,13 +80,19 @@ jobs:
dev:
needs: [latest]
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
permissions:
id-token: write
attestations: write
uses: ./.github/workflows/build.yml
with:
ref: ${{ needs.latest.outputs.dev-version }}
secrets: inherit

edge:
needs: [latest]
permissions:
id-token: write
attestations: write
uses: ./.github/workflows/build.yml
with:
ref: ${{ needs.latest.outputs.edge-version }}

0 comments on commit fcb0a2a

Please sign in to comment.