Skip to content

possible fix

possible fix #4

Workflow file for this run

name: Publish NuGet Package
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0.x'
# dummy versioning system to prevent nuget from complaining
- name: Set Version
run: echo "VERSION=1.0.$(git rev-list --count main)" >> $GITHUB_ENV
- name: Build NuGet package
run: dotnet pack ./SkiServiceModels/SkiServiceModels.csproj --configuration Release -o nupkg /p:Version=$VERSION
- name: Publish NuGet package
run: dotnet nuget push ./nupkg/*.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json