Skip to content

Commit

Permalink
Attest artifacts (#634)
Browse files Browse the repository at this point in the history
- Attest the binaries from the build artifacts.
- Ignore any `binlog` files.
  • Loading branch information
martincostello committed May 11, 2024
1 parent 190d4bc commit 25e1c00
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ jobs:
dotnet-sdk-version: ${{ steps.setup-dotnet.outputs.dotnet-version }}
dotnet-validate-version: ${{ steps.get-dotnet-validate-version.outputs.dotnet-validate-version }}

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

strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -62,6 +67,15 @@ jobs:
flags: ${{ matrix.os_name }}
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/MartinCostello.Logging.XUnit/release*/*.dll

- name: Publish artifacts
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

- name: Checkout code
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5

- name: Add actionlint problem matcher
run: echo "::add-matcher::.github/actionlint-matcher.json"

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ packages
TestResults
UpgradeLog*.htm
UpgradeLog*.XML
*.binlog
*.coverage
*.DotSettings
*.GhostDoc.xml
Expand Down

0 comments on commit 25e1c00

Please sign in to comment.