Skip to content

Commit dee6cf2

Browse files
authored
Create publish-nuget-package.yml
1 parent 7a53536 commit dee6cf2

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: publish-nuget-package
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Setup .NET
17+
uses: actions/setup-dotnet@v1
18+
with:
19+
dotnet-version: 5.0.x
20+
- name: Restore dependencies
21+
run: dotnet restore
22+
- name: Pack
23+
run: |
24+
cd $DOTNET_PROJECT_DIR
25+
dotnet pack -c Release -o out
26+
- name: Publish
27+
env:
28+
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
29+
run: dotnet nuget push ./$DOTNET_PROJECT_DIR/out/*.nupkg --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json

0 commit comments

Comments
 (0)