Skip to content

Commit bd7051f

Browse files
Add GitHub Actions workflow to publish NuGet package
1 parent ccee3a1 commit bd7051f

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/nuget.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: NuGet
2+
on:
3+
push:
4+
tags:
5+
- '*'
6+
7+
jobs:
8+
Publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v1
12+
with:
13+
ref: ${{ github.ref }}
14+
15+
- uses: actions/setup-dotnet@v1
16+
with:
17+
dotnet-version: 5.0.x
18+
19+
- name: Run tests
20+
run: dotnet test -c Release
21+
22+
- name: Package
23+
run: dotnet pack -c Release
24+
25+
- name: Publish
26+
run: dotnet nuget push src/bin/Release/SrcSet.$(echo ${{ github.ref }} | sed 's/refs\/tags\///').nupkg -k ${{ secrets.NUGET_TOKEN }} -s https://api.nuget.org/v3/index.json

0 commit comments

Comments
 (0)