Skip to content

Nuget publish

Nuget publish #6

Workflow file for this run

name: Nuget publish
on:
workflow_dispatch:
jobs:
publish:
env:
Project: 'GoLive.Generator.BlazorInterop/GoLive.Generator.BlazorInterop.csproj'
BUILD_VER : '2.0'
name: build, pack & publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Setup NuGet
uses: nuget/setup-nuget@v1
- name: Get Build Version
run: |
echo "BUILD_VERSION=${{ format('{0}.{1}', env.BUILD_VER, github.run_number ) }}" >> $GITHUB_ENV
- name: Build Package
run: dotnet pack $Project --configuration Release -p:Version=$BUILD_VERSION -p:PackageVersion=$BUILD_VERSION -p:GeneratePackageOnBuild=false
- name: Publish
run: nuget push **\*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_KEY}}