Skip to content

v2.1.0

v2.1.0 #21

Workflow file for this run

name: Publish to NuGet
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
8.0.x
7.0.x
- name: Extract version from tag
run: echo "VERSION=$(echo ${GITHUB_REF#refs/tags/v})" >> $GITHUB_ENV
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore -c Release
# - name: Test
# run: dotnet test --no-build
- name: Pack
run: dotnet pack --no-build -c Release -o nupkg -p:Version=${{ env.VERSION }}
- name: Publish
run: dotnet nuget push "nupkg/*.nupkg" -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json