-
Notifications
You must be signed in to change notification settings - Fork 10
33 lines (28 loc) · 957 Bytes
/
nuget.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Publish NuGet package
on:
workflow_dispatch:
env:
HUSKY: 0
jobs:
build:
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
7.0.x
8.0.x
9.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build -c Release --no-restore /p:PublicRelease=true
- name: Push to nuget.org
env:
NUGET_KEY: ${{ secrets.NUGET_KEY }}
run: dotnet nuget push "src/*/bin/Release/*.nupkg" --api-key "$NUGET_KEY" --skip-duplicate --source https://api.nuget.org/v3/index.json