-
Notifications
You must be signed in to change notification settings - Fork 15
42 lines (36 loc) · 1.12 KB
/
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
33
34
35
36
37
38
39
40
41
42
name: Publish
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0.100'
- name: Download nupkg
uses: dawidd6/action-download-artifact@v2
with:
github_token: ${{secrets.GITHUB_TOKEN}}
workflow: build.yml
commit: ${{github.sha}}
name: nuget
- name: Push to GitHub release
uses: svenstaro/[email protected]
with:
tag: ${{github.ref}}
repo_token: ${{secrets.GITHUB_TOKEN}}
file_glob: 'true'
file: ./*.nupkg
- name: Push to GitHub feed
run: dotnet nuget push *.nupkg
--api-key "${{secrets.GITHUB_TOKEN}}"
--source "https://nuget.pkg.github.com/${{github.repository_owner}}/"
--skip-duplicate
- name: Push to NuGet
run: dotnet nuget push *.nupkg
--api-key ${{secrets.NUGET_API_KEY}}
--source https://api.nuget.org/v3/index.json
--skip-duplicate