Skip to content

3.2.0

3.2.0 #25

Workflow file for this run

# This workflow is run when releasing and is responsible for packing and pushing Nuget updates
name: Release
on:
release:
types: [ published ]
branches: [ main ]
jobs:
build:
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
# Set up MSBuild in PATH for command
- name: Setup MSBuild in PATH
uses: microsoft/setup-msbuild@v1
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.x'
# Get NuGet setup for restoring, packaging and pushing
- name: Setup NuGet
uses: NuGet/[email protected]
- name: Restore packages with NuGet
run: nuget restore Unleash.sln
# Get the versioning build variables in place
- name: Set versioning build variables
env:
NUGET_VERSION: ${{ github.event.release.tag_name }}
run: |
echo "nuget=${NUGET_VERSION}" >> $GITHUB_ENV
echo "file=${NUGET_VERSION%-beta*}" >> $GITHUB_ENV
echo "assembly=${NUGET_VERSION%-beta*}" >> $GITHUB_ENV
shell: bash
- name: Build the solution
run: msbuild Unleash.sln /p:Configuration=Release /p:Version=${{ env.nuget }} /p:FileVersion=${{ env.file }} /p:AssemblyVersion=${{ env.assembly }}
- name: Publish package
run: nuget push **\Unleash.Client.*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{ secrets.NUGET_API_KEY }}