Skip to content

Commit 18b00ac

Browse files
Attest artifacts (#889)
Attest the binaries and packages from the build artifacts.
1 parent 67f41f9 commit 18b00ac

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

.github/workflows/build.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ jobs:
2626
outputs:
2727
dotnet-sdk-version: ${{ steps.setup-dotnet.outputs.dotnet-version }}
2828

29+
permissions:
30+
attestations: write
31+
contents: read
32+
id-token: write
33+
2934
strategy:
3035
fail-fast: false
3136
matrix:
@@ -77,6 +82,20 @@ jobs:
7782
if: ${{ runner.os != 'Windows' }}
7883
run: ./eng/common/cibuild.sh -configuration Release -prepareMachine
7984

85+
- name: Attest artifacts
86+
uses: actions/attest-build-provenance@49df96e17e918a15956db358890b08e61c704919 # v1.2.0
87+
if: |
88+
runner.os == 'Windows' &&
89+
github.event.repository.fork == false &&
90+
(github.ref_name == github.event.repository.default_branch ||
91+
startsWith(github.ref, 'refs/heads/dev') ||
92+
startsWith(github.ref, 'refs/heads/rel/') ||
93+
startsWith(github.ref, 'refs/tags/'))
94+
with:
95+
subject-path: |
96+
./artifacts/bin/AspNet.Security.*/Release/**/AspNet.Security.*.dll
97+
./artifacts/packages/Release/Shipping/*
98+
8099
- name: Publish logs
81100
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
82101
if: ${{ always() }}
@@ -134,7 +153,7 @@ jobs:
134153
runs-on: ubuntu-latest
135154
if: |
136155
github.event.repository.fork == false &&
137-
(github.ref == format('refs/heads/{0}', github.event.repository.default_branch) ||
156+
(github.ref_name == github.event.repository.default_branch ||
138157
startsWith(github.ref, 'refs/heads/dev') ||
139158
startsWith(github.ref, 'refs/heads/rel/') ||
140159
startsWith(github.ref, 'refs/tags/'))

0 commit comments

Comments
 (0)