-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (49 loc) · 1.79 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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