-
Notifications
You must be signed in to change notification settings - Fork 23
52 lines (42 loc) · 1.17 KB
/
publish_packages.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
48
49
50
51
52
name: Publish Packages
on: workflow_dispatch
jobs:
pack:
runs-on: ubuntu-latest
environment: pack
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Dotnet SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore -c Release
- name: Pack
run: dotnet pack --no-restore -c Release -o ./pack
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: nuget-packages
path: pack
push:
runs-on: ubuntu-latest
needs: pack
environment: push
env:
NUGET_KEY: ${{ secrets.NUGET_KEY }}
steps:
- name: Setup Dotnet SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.x
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: nuget-packages
path: pack
- name: Push
run: dotnet nuget push "**/*.nupkg" --source https://api.nuget.org/v3/index.json --skip-duplicate --api-key ${{ env.NUGET_KEY }}