v2.2.1 #82
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 to Nuget.org | |
on: | |
release: | |
types: [published] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Get Build Version | |
run: | | |
Import-Module .\build\GetBuildVersion.psm1 | |
Write-Host $Env:GITHUB_REF | |
$version = GetBuildVersion -VersionString $Env:GITHUB_REF | |
echo "BUILD_VERSION=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append | |
shell: pwsh | |
- name: Setup .NET | |
uses: actions/[email protected] | |
with: | |
dotnet-version: '7.0.x' | |
- name: Setup NuGet | |
uses: NuGet/[email protected] | |
- name: Restore dependencies | |
run: dotnet restore EngineKit.sln | |
- name: Build | |
run: dotnet pack src/EngineKit/EngineKit.csproj --configuration Release -p:Version=$BUILD_VERSION --no-restore | |
- name: Publish | |
if: startsWith(github.ref, 'refs/tags') | |
run: nuget push **\*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET}} |