Release 4.0.0. #1
Workflow file for this run
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: Deploy | |
on: | |
push: | |
tags: ['[0-9]+.[0-9]+*'] | |
env: | |
SDK_VERSION: ${{ github.ref_name }} | |
jobs: | |
deploy: | |
# Build on Windows 2022 to support .NET Framework 4.5 | |
runs-on: windows-2022 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: | | |
2.1 | |
3.1 | |
- name: Build | |
run: | | |
dotnet restore Worldline.Connect.Sdk | |
dotnet build -c Release Worldline.Connect.Sdk | |
dotnet pack -c Release Worldline.Connect.Sdk | |
dotnet restore Worldline.Connect.Sdk.StrongName | |
dotnet build -c Release Worldline.Connect.Sdk.StrongName | |
dotnet pack -c Release Worldline.Connect.Sdk.StrongName | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: packages | |
path: '**/*.nupkg' | |
retention-days: 1 | |
- name: Deploy | |
run: | | |
dotnet nuget push Worldline.Connect.Sdk/bin/Release/Worldline.Connect.Sdk.${env:SDK_VERSION}.nupkg --api-key "${env:NUGET_API_KEY}" --source https://api.nuget.org/v3/index.json | |
dotnet nuget push Worldline.Connect.Sdk.StrongName/bin/Release/Worldline.Connect.Sdk.StrongName.${env:SDK_VERSION}.nupkg --api-key "${env:NUGET_API_KEY}" --source https://api.nuget.org/v3/index.json | |
env: | |
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} |