-
Notifications
You must be signed in to change notification settings - Fork 24
41 lines (38 loc) · 1.25 KB
/
release.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
34
35
36
37
38
39
40
41
name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Build packages
run: |
dotnet --info
dotnet pack -o packages
- name: Publish to NuGet.org
run: dotnet nuget push "packages/*.nupkg" -k ${{ secrets.NUGET_AUTH_TOKEN }} -s https://api.nuget.org/v3/index.json --skip-duplicate
release:
needs: publish
runs-on: ubuntu-latest
steps:
- name: Pre-release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/') && (contains(github.ref,'preview') || contains(github.ref,'beta') || contains(github.ref,'alpha') || contains(github.ref,'rc'))
with:
prerelease: true
generate_release_notes: true
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/') && !(contains(github.ref,'preview') || contains(github.ref,'beta') || contains(github.ref,'alpha') || contains(github.ref,'rc'))
with:
generate_release_notes: true