Skip to content

Commit

Permalink
Artifact attestation
Browse files Browse the repository at this point in the history
Attest the binaries and packages from the build artifacts.
  • Loading branch information
martincostello committed May 13, 2024
1 parent e4c6a7a commit 6205d33
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/actions-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ jobs:
run: echo "::add-matcher::.github/actionlint-matcher.json"

- name: Lint workflows
uses: docker://rhysd/actionlint@sha256:daa1edae4a6366f320b68abb60b74fb59a458c17b61938d3c62709d92b231558 # v1.6.27
uses: docker://rhysd/actionlint@sha256:5acca218639222e4afbc82fc6e9ef56cbe646ade3b07f3f5ec364b638258a244 # v1.7.0
with:
args: -color
25 changes: 25 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,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 @@ -79,6 +84,26 @@ jobs:
flags: ${{ runner.os }}
token: ${{ secrets.CODECOV_TOKEN }}

- name: Attest artifacts
uses: actions/attest-build-provenance@951c0c5f8e375ad4efad33405ab77f7ded2358e4 # v1.1.1
if: |
runner.os == 'Windows' &&
github.event.repository.fork == false &&
(github.ref_name == github.event.repository.default_branch || startsWith(github.ref, 'refs/tags/v'))
with:
subject-path: |
./artifacts/bin/Swashbuckle.AspNetCore.Annotations/release*/Swashbuckle.AspNetCore.Annotations.dll
./artifacts/bin/Swashbuckle.AspNetCore.ApiTesting/release*/Swashbuckle.AspNetCore.ApiTesting.dll
./artifacts/bin/Swashbuckle.AspNetCore.ApiTesting.Xunit/release*/Swashbuckle.AspNetCore.ApiTesting.Xunit.dll
./artifacts/bin/Swashbuckle.AspNetCore.Cli/release*/dotnet-swagger.dll
./artifacts/bin/Swashbuckle.AspNetCore.Cli/release*/dotnet-swagger.exe
./artifacts/bin/Swashbuckle.AspNetCore.Newtonsoft/release*/Swashbuckle.AspNetCore.Newtonsoft.dll
./artifacts/bin/Swashbuckle.AspNetCore.ReDoc/release*/Swashbuckle.AspNetCore.ReDoc.dll
./artifacts/bin/Swashbuckle.AspNetCore.Swagger/release*/Swashbuckle.AspNetCore.Swagger.dll
./artifacts/bin/Swashbuckle.AspNetCore.SwaggerGen/release*/Swashbuckle.AspNetCore.SwaggerGen.dll
./artifacts/bin/Swashbuckle.AspNetCore.SwaggerUI/release*/Swashbuckle.AspNetCore.SwaggerUI.dll
./artifacts/package/release/*
- name: Publish NuGet packages
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
Expand Down

0 comments on commit 6205d33

Please sign in to comment.