-
-
Notifications
You must be signed in to change notification settings - Fork 34
38 lines (34 loc) · 1.31 KB
/
build.yaml
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
name: dotnet package
on: [push]
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
dotnet-version: [ '6.0.x' ]
steps:
- uses: actions/checkout@v3
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Restore signing pfx
id: create-pfx
shell: pwsh
env:
PFX_CONTENT: ${{ secrets.NPLABS_WINDOWS_20210514_SIGNING_CERT }}
run: |
$pfxPath = Join-Path -Path $env:RUNNER_TEMP -ChildPath "cert.pfx";
$encodedBytes = [System.Convert]::FromBase64String($env:PFX_CONTENT);
Set-Content $pfxPath -Value $encodedBytes -AsByteStream;
Write-Output "::set-output name=PFX_PATH::$pfxPath";
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Sign Exported Nuget Packages
env:
PFX_KEY: ${{ secrets.NPLABS_WINDOWS_20210514_SIGNING_KEY }}
run: |
$pfxPath = Join-Path -Path $env:RUNNER_TEMP -ChildPath "cert.pfx";
nuget sign **\*.nupkg -CertificatePath $pfxPath -CertificatePassword $env:PFX_KEY -Timestamper http://timestamp.comodoca.com/rfc3161