build: Change version to 3.1.1 #7
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: 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 | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: windows-installer | |
path: | | |
Buttplug*/**/*.*nupkg |