-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (24 loc) · 929 Bytes
/
publish.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
name: Publish
on:
release:
types: [ published ]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v2
with:
dotnet-version: "6.0.x"
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build -c Release -v normal -p:Version=${{ github.ref_name }}
- name: Pack (Beta)
run: dotnet pack -c Release --include-symbols --no-build -v normal -o . -p:PackageVersion=${{ github.ref_name }}-beta
if: "github.event.release.prerelease"
- name: Pack (Stable)
run: dotnet pack -c Release --include-symbols --no-build -v normal -o . -p:PackageVersion=${{ github.ref_name }}
if: "!github.event.release.prerelease"
- name: Publish
run: dotnet nuget push "*.nupkg" -k ${{ secrets.NUGET_KEY }} --skip-duplicate -s https://api.nuget.org/v3/index.json