VbaCompression library v0.5.1 #14
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
push: | |
tags: [ 'v*.*.*' ] | |
permissions: | |
contents: write | |
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: 8 | |
- 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_packages | |
path: | | |
${{ github.workspace }}/dist | |
${{ github.workspace }}/src/Kavod.Vba.Compression/README.md | |
sign: | |
needs: build | |
runs-on: windows-2022 | |
steps: | |
- name: download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: VbaCompression_packages | |
path: ${{ github.workspace }} | |
- name: setup dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 6 | |
- name: setup NuGetKeyVaultSignTool | |
run: dotnet tool install --verbosity minimal --global NuGetKeyVaultSignTool --version 3.2.3 | |
- name: sign | |
id: sign_package | |
working-directory: '${{ github.workspace}}/dist' | |
run: | | |
NuGetKeyVaultSignTool.exe sign *.nupkg ` | |
--file-digest sha256 ` | |
--timestamp-rfc3161 http://timestamp.digicert.com ` | |
--timestamp-digest sha256 ` | |
--azure-key-vault-url "${{ secrets.KEYVAULT_URL }}" ` | |
--azure-key-vault-tenant-id "${{ secrets.KEYVAULT_TENANT_ID }}" ` | |
--azure-key-vault-client-id "${{ secrets.KEYVAULT_CLIENT_ID }}" ` | |
--azure-key-vault-client-secret "${{ secrets.AZURESIGNTOOL_CLIENT_SECRET }}" ` | |
--azure-key-vault-certificate "goITSolutions-until-2024-01" | |
- name: publish | |
if: ${{ steps.sign_package.outcome == 'success' }} | |
working-directory: '${{ github.workspace}}/dist' | |
run: | | |
dotnet nuget push "*.nupkg" --api-key $env:NUGET_PUSH_KEY --source https://api.nuget.org/v3/index.json | |
env: | |
NUGET_PUSH_KEY: ${{ secrets.NUGET_PUSH_KEY }} | |
- name: release | |
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1, v0.1.15 | |
if: always() && startsWith(github.ref, 'refs/tags/') | |
with: | |
name: 'VbaCompression ${{ github.ref_name }}' | |
body_path: ${{ github.workspace }}/src/Kavod.Vba.Compression/README.md |