Skip to content

Commit f315960

Browse files
authored
Workflow for Publishing Nuget Package (#64)
* Committing script for building nuget package * Script replaced with github action workflow * On pull requests as well * Bump version * Updated build config * Ready to test --------- Co-authored-by: John Detter <[email protected]>
1 parent 9c744a3 commit f315960

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Publish NuGet Package on Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build-and-publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Setup .NET
13+
uses: actions/setup-dotnet@v3
14+
with:
15+
dotnet-version: '8'
16+
- name: Restore dependencies
17+
run: dotnet restore
18+
- name: Build
19+
run: dotnet build --no-restore --configuration Release
20+
# - name: Test
21+
# run: dotnet test --no-build
22+
- name: Pack
23+
run: dotnet pack --no-build --output nupkgs
24+
- name: Publish
25+
run: dotnet nuget push nupkgs/*.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json

0 commit comments

Comments
 (0)