From 0bfa5f98fbc8e96f7cd8fef76131c422c70448dc Mon Sep 17 00:00:00 2001 From: David Sungaila Date: Tue, 14 May 2024 18:02:58 +0200 Subject: [PATCH] Add signed build provenance attestations; update NuGet packages (#52) --- .github/workflows/dotnet.yml | 8 ++++++++ Tests/Tests.csproj | 4 ++-- WebConverter/WebConverter.csproj | 6 +++--- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index d4fe312..4c6cae9 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -46,6 +46,10 @@ jobs: name: Build runs-on: windows-latest if: (github.event_name != 'workflow_dispatch' && true || inputs.run_build) == true + permissions: + id-token: write + contents: read + attestations: write steps: - name: Checkout uses: actions/checkout@main @@ -89,6 +93,10 @@ jobs: run: msbuild PDFtoZPL.Build.slnf /p:Configuration=${{ github.event_name != 'workflow_dispatch' && 'Debug' || inputs.build_configuration }} /p:VersionSuffix=ci /p:RestorePackages=false - name: Pack run: msbuild PDFtoZPL/PDFtoZPL.csproj /t:pack /p:Configuration=${{ github.event_name != 'workflow_dispatch' && 'Debug' || inputs.build_configuration }} /p:VersionSuffix=ci /p:RestorePackages=false + - name: Generate artifact attestation + uses: actions/attest-build-provenance@main + with: + subject-path: PDFtoZPL/bin/${{ github.event_name != 'workflow_dispatch' && 'Debug' || inputs.build_configuration }}/*.nupkg - name: Publish libraries uses: actions/upload-artifact@v4 with: diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj index 2989f77..0210c4a 100644 --- a/Tests/Tests.csproj +++ b/Tests/Tests.csproj @@ -62,7 +62,7 @@ - - + + \ No newline at end of file diff --git a/WebConverter/WebConverter.csproj b/WebConverter/WebConverter.csproj index 8774015..aa179c8 100644 --- a/WebConverter/WebConverter.csproj +++ b/WebConverter/WebConverter.csproj @@ -45,9 +45,9 @@ - - - + + +