Update build workflow script #20
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: build | |
on: | |
push: | |
branches: [ "main", "dev/*", "release/*" ] | |
tags: [ 'v*.*.*' ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: windows-2019 | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: setup msbuild | |
uses: microsoft/setup-msbuild@v2 | |
- name: setup build information | |
id: build | |
run: .\.github\Get-BuildInfo.ps1 -ref '${{ github.ref }}' -event_name '${{ github.event_name }}' -configuration Release | |
- name: setup dotnet | |
if: steps.build.outputs.sign_binaries == 'true' | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8 | |
- name: setup signtool | |
if: steps.build.outputs.sign_binaries == 'true' | |
run: dotnet tool install --verbosity minimal --global OpenVsixSignTool --version 0.3.2 | |
- name: build extension | |
run: msbuild /m /restore NetOfficeExtension.sln | |
env: | |
Configuration: Release | |
DeployExtension: false | |
- name: sign extension | |
if: steps.build.outputs.sign_binaries == 'true' | |
run: | | |
OpenVsixSignTool sign ` | |
--file-digest sha256 ` | |
--timestamp http://timestamp.digicert.com ` | |
--timestamp-algorithm sha256 ` | |
--azure-key-vault-url ${{ secrets.KEYVAULT_URL }} ` | |
--azure-key-vault-client-id "${{ secrets.KEYVAULT_CLIENT_ID }}" ` | |
--azure-key-vault-client-secret "${{ secrets.KEYVAULT_CLIENT_SECRET }}" ` | |
--azure-key-vault-certificate "goITSolutions-until-2024-01" ` | |
src/NetOfficeExtension/bin/Release/NetOfficeExtension.vsix | |
- name: upload artifact | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: NetOfficeExtension_${{ steps.build.outputs.app_version_full }}.vsix | |
path: src/NetOfficeExtension/bin/Release/NetOfficeExtension.vsix |