-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (40 loc) · 1.38 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
43
44
45
name: Artifacts publish
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
# Artifacts from rc/** (release candidates) branches will be published on package feeds
# This branches can contain release candidates, preview and other pre-release packages
# While master branch will contain only stable releases
# Also, I want to consider finding a proper name for such branches
on:
workflow_run:
workflows: ["CI Build"]
branches:
- 'master'
- 'rc/**'
types:
- completed
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: dawidd6/action-download-artifact@v2
with:
workflow: build.yml
workflow_conclusion: success
branch: ${{ github.event.workflow_run.head_branch }}
name: nupkg
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Enable globstar
run: |
shopt -s globstar
- name: Publish to Nuget
run: |
dotnet nuget push **/*.nupkg --api-key ${{secrets.NUGET_KEY}} --source https://api.nuget.org/v3/index.json --skip-duplicate
- name: Publish to GitHub Packages
run: |
dotnet nuget push **/*.nupkg --api-key ${{secrets.GITHUB_TOKEN}} --source https://nuget.pkg.github.com/AvaloniaUtils/index.json --skip-duplicate