-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (39 loc) · 1.09 KB
/
release.yaml
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
42
43
44
45
46
47
name: "Release NuGets"
on:
release:
types: [published]
# push:
# tags:
# - "v*.*.*.*"
workflow_dispatch:
jobs:
publish_nugets:
name: "Publish NuGets"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout"
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: "Setup .NET CLI"
uses: actions/setup-dotnet@v3
with:
dotnet-version: "8.x"
- name: "Restore Solution NuGets"
run: dotnet restore
- name: "Build Solution"
run: dotnet build
--no-restore
--configuration "Release"
- name: "Pack NuGets"
run: dotnet pack
--no-restore --no-build
--configuration "Release"
--output "nupkgs"
- name: "Upload NuGets to Artifacts"
uses: actions/upload-artifact@v3
with:
name: "nupkgs"
path: "nupkgs"
- name: "Upload NuGets to nuget.org"
run: dotnet nuget push "nupkgs/**/*.nupkg" --api-key ${{secrets.nuget_api_key}} --source https://api.nuget.org/v3/index.json --skip-duplicate