Version bump #27
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 | |
paths-ignore: | |
- '**/*.md' | |
- '**/*.gitignore' | |
- '**/*.gitattributes' | |
workflow_dispatch: | |
branches: | |
- main | |
paths-ignore: | |
- '**/*.md' | |
- '**/*.gitignore' | |
- '**/*.gitattributes' | |
env: | |
PACKAGE_PATH: './package' | |
jobs: | |
dotnet_workflow: | |
name: Pack | |
runs-on: windows-latest | |
env: | |
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | |
DOTNET_NOLOGO: true | |
DOTNET_GENERATE_ASPNET_CERTIFICATE: false | |
DOTNET_ADD_GLOBAL_TOOLS_TO_PATH: false | |
DOTNET_MULTILEVEL_LOOKUP: 0 | |
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: true | |
TERM: xterm | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET Core SDK | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: 6.0.x | |
- name: Pack | |
working-directory: src | |
run: dotnet pack -o ${{ env.PACKAGE_PATH }} | |
- name: Setup NuGet | |
uses: NuGet/[email protected] | |
with: | |
nuget-api-key: ${{ secrets.NUGET_KEY }} | |
nuget-version: latest | |
- name: Get certificate | |
id: cert_file | |
uses: timheuer/base64-to-file@v1 | |
with: | |
fileName: 'certfile.pfx' | |
encodedString: ${{ secrets.SIGNING_CERT }} | |
# Sign the package | |
- name: Sign NuGet Package | |
run: nuget sign "**/*.nupkg" -CertificatePath ${{ steps.cert_file.outputs.filePath }} -CertificatePassword "${{ secrets.CERT_PWD }}" -Timestamper http://timestamp.digicert.com -NonInteractive | |
- name: Publish NuGet package | |
run: dotnet nuget push "**/*.nupkg" -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json | |
- name: Publish artifact | |
uses: actions/upload-artifact@master | |
with: | |
name: packaged-template | |
path: ./src/package |