Skip to content

Generate attestation for signed VbaCompression packages #5

Generate attestation for signed VbaCompression packages

Generate attestation for signed VbaCompression packages #5

name: release-signed
on:
push:
branches:
- signed_release
permissions:
contents: read
env:
DOTNET_NOLOGO: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_GENERATE_ASPNET_CERTIFICATE: 0
ContinuousIntegrationBuild: true
RestoreLockedMode: true
Configuration: Release
RepositoryBranch: '${{ github.ref_name }}'
RepositoryCommit: '${{ github.sha }}'
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6
7
8
9
- name: restore
run: dotnet restore
- name: build
run: dotnet build --no-restore
- name: test
run: dotnet test --no-build --no-restore
- name: pack
run: dotnet pack --no-build --no-restore -o dist
- name: publish artifact
uses: actions/upload-artifact@v4
with:
name: VbaCompression_unsigned_packages
path: |
${{ github.workspace }}/dist
${{ github.workspace }}/src/Kavod.Vba.Compression/README.md
sign:
needs: build
environment: sign
runs-on: windows-2022
permissions:
contents: read
id-token: write
attestations: write
steps:
- name: publish artifact
uses: actions/download-artifact@v4
with:
name: VbaCompression_unsigned_packages
- name: azure login
uses: azure/login@v2
with:
client-id: ${{ secrets.TRUSTED_SIGNING_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: setup dotnet sign
run: dotnet tool install --global sign --version 0.9.1-beta.24529.1
- name: sign
run: >
sign code trusted-signing
**/*.nupkg
--base-directory "${{ github.workspace }}/dist"
--publisher-name "NetOffice"
--description "VbaCompression library"
--description-url "https://github.com/NetOfficeFw/VbaCompression"
--trusted-signing-endpoint "https://weu.codesigning.azure.net/"
--trusted-signing-account "OpenSourceSigning"
--trusted-signing-certificate-profile "JozefIzsoOpenSourceProfile"
- name: attestation
uses: actions/attest-build-provenance@v2
with:
subject-path: 'dist/*.nupkg'
show-summary: true
- name: publish artifact
uses: actions/upload-artifact@v4
with:
name: VbaCompression_signed_packages
path: |
${{ github.workspace }}/dist
${{ github.workspace }}/src/Kavod.Vba.Compression/README.md