Skip to content

Commit 382b70a

Browse files
committed
Add NuGET CI publish workflow
1 parent 702443c commit 382b70a

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/publish.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
tags: 'v*'
6+
7+
jobs:
8+
build-and-publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout package
12+
uses: actions/checkout@v3
13+
- name: Setup .NET
14+
uses: actions/setup-dotnet@v3
15+
with:
16+
dotnet-version: '6.x'
17+
- name: Perform packaging
18+
run: dotnet pack lib --configuration Release
19+
- name: Publish to NuGet
20+
run: dotnet nuget push "lib/**/bin/Release/*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
21+

0 commit comments

Comments
 (0)