-
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (26 loc) · 864 Bytes
/
publish.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Publish NuGet Package
on:
release:
types: [published]
jobs:
nuget-org:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
dotnet-quality: 'ga'
- name: Restore dependencies
working-directory: src
run: dotnet restore
- name: Build
working-directory: src
run: dotnet build --configuration Release --no-restore
- name: Pack
working-directory: src
run: dotnet pack --configuration Release --no-build --output nupkgs
- name: Push to NuGet.org
working-directory: src
run: dotnet nuget push ./nupkgs/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_ORG_API_KEY }} --skip-duplicate