Skip to content

Commit 9db890b

Browse files
committed
Add NuGet publish action
1 parent 19e319d commit 9db890b

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/nuget.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Build and Publish NuGet Packages
2+
3+
on: workflow_dispatch
4+
5+
jobs:
6+
build-and-publish:
7+
runs-on: ubuntu-latest
8+
9+
env:
10+
NUGET_SOURCE: https://api.nuget.org/v3/index.json
11+
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
12+
13+
strategy:
14+
matrix:
15+
project: [SharpFuzz, SharpFuzz.CommandLine]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: actions/setup-dotnet@v4
20+
with:
21+
dotnet-version: 9.0
22+
23+
- name: Build NuGet package for ${{ matrix.project }}
24+
working-directory: src/${{ matrix.project }}
25+
run: dotnet pack --configuration Release --output out/${{ matrix.project }}
26+
27+
- name: Publish NuGet package for ${{ matrix.project }}
28+
working-directory: src/${{ matrix.project }}
29+
run: dotnet nuget push out/${{ matrix.project }}/*.nupkg --source $NUGET_SOURCE --api-key $NUGET_API_KEY

0 commit comments

Comments
 (0)