Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attest artifacts #889

Merged
merged 1 commit into from
Jun 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ jobs:
outputs:
dotnet-sdk-version: ${{ steps.setup-dotnet.outputs.dotnet-version }}

permissions:
attestations: write
contents: read
id-token: write

strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -77,6 +82,20 @@ jobs:
if: ${{ runner.os != 'Windows' }}
run: ./eng/common/cibuild.sh -configuration Release -prepareMachine

- name: Attest artifacts
uses: actions/attest-build-provenance@49df96e17e918a15956db358890b08e61c704919 # v1.2.0
if: |
runner.os == 'Windows' &&
github.event.repository.fork == false &&
(github.ref_name == github.event.repository.default_branch ||
startsWith(github.ref, 'refs/heads/dev') ||
startsWith(github.ref, 'refs/heads/rel/') ||
startsWith(github.ref, 'refs/tags/'))
with:
subject-path: |
./artifacts/bin/AspNet.Security.*/Release/**/AspNet.Security.*.dll
./artifacts/packages/Release/Shipping/*

- name: Publish logs
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
if: ${{ always() }}
Expand Down Expand Up @@ -134,7 +153,7 @@ jobs:
runs-on: ubuntu-latest
if: |
github.event.repository.fork == false &&
(github.ref == format('refs/heads/{0}', github.event.repository.default_branch) ||
(github.ref_name == github.event.repository.default_branch ||
startsWith(github.ref, 'refs/heads/dev') ||
startsWith(github.ref, 'refs/heads/rel/') ||
startsWith(github.ref, 'refs/tags/'))
Expand Down