Skip to content

Commit dc62cd1

Browse files
committed
ci: added github attestation to build assets
1 parent 5dd512e commit dc62cd1

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

.github/workflows/build-nativeshims.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,13 @@ jobs:
108108

109109
pack:
110110
name: Package artifacts
111+
permissions:
112+
pull-requests: write
113+
checks: write
114+
id-token: write
115+
contents: read
116+
packages: read
117+
attestations: write
111118
runs-on: windows-2019
112119
needs: [build-windows, build-linux-amd64, build-linux-arm64, build-macos]
113120
steps:
@@ -128,6 +135,13 @@ jobs:
128135
with:
129136
name: Yubico.NativeShims.nupkg
130137
path: Yubico.NativeShims.*.nupkg
138+
139+
- name: Generate artifact attestation
140+
uses: actions/attest-build-provenance@v2
141+
with:
142+
subject-path: |
143+
'${{ github.workspace }}/**/*.nupkg'
144+
'${{ github.workspace }}/**/*.dll'
131145
132146
publish-internal:
133147
name: Publish to internal NuGet

.github/workflows/build.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,12 @@ jobs:
5858
runs-on: windows-2019
5959
needs: run-tests
6060
permissions:
61+
pull-requests: write
62+
checks: write
63+
id-token: write
6164
contents: read
6265
packages: read
66+
attestations: write
6367
steps:
6468
# Checkout the local repository
6569
- uses: actions/checkout@v4
@@ -118,6 +122,14 @@ jobs:
118122
Yubico.Core/src/bin/ReleaseWithDocs/**/*.dll
119123
Yubico.YubiKey/src/bin/ReleaseWithDocs/**/*.dll
120124
125+
- name: Generate artifact attestation
126+
uses: actions/attest-build-provenance@v2
127+
with:
128+
subject-path: |
129+
'${{ github.workspace }}/**/*.nupkg'
130+
'${{ github.workspace }}/**/*.snupkg'
131+
'${{ github.workspace }}/**/*.dll'
132+
121133
# Package the OATH sample code source
122134
- name: Save build artifacts
123135
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)