1- name : Publish
2-
3- on :
4- push :
5- tags :
6- - ' *'
7- branches :
8- - master
9- paths :
10- - ' src/**'
11-
12- env :
13- DOTNET_SKIP_FIRST_TIME_EXPERIENCE : true
14- DOTNET_CLI_TELEMETRY_OPTOUT : true
15-
16- jobs :
17-
18- # ##################################################
19- # DOCS
20- # ##################################################
21-
22- # docs:
23- # name: Documentation
24- # runs-on: ubuntu-latest
25- # steps:
26- # - name: Checkout
27- # uses: actions/checkout@master
28-
29- # - name: Setup dotnet
30- # uses: actions/setup-dotnet@v1
31- # with:
32- # dotnet-version: '3.1.402 # SDK Version to use.
33-
34- # - name: Build
35- # shell: bash
36- # env:
37- # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38- # run: |
39- # cd docs
40- # dotnet run --configuration Release
41-
42- # ##################################################
43- # BUILD
44- # ##################################################
45-
46- build :
47- name : Build
48- # needs: [docs]
49- if : " !contains(github.event.head_commit.message, 'skip-ci') || startsWith(github.ref, 'refs/tags/')"
50- strategy :
51- matrix :
52- kind : ['linux', 'windows', 'macOS']
53- include :
54- - kind : linux
55- os : ubuntu-latest
56- - kind : windows
57- os : windows-latest
58- - kind : macOS
59- os : macos-latest
60- runs-on : ${{ matrix.os }}
61- steps :
62- - name : Checkout
63- uses : actions/checkout@v2
64- with :
65- fetch-depth : 0
66-
67- - name : Setup dotnet
68- uses : actions/setup-dotnet@v1
69- with :
70- dotnet-version : 3.1.402
71-
72- - name : Build
73- shell : bash
74- run : |
75- dotnet tool restore
76- dotnet cake
77-
78- # ##################################################
79- # PUBLISH
80- # ##################################################
81-
82- publish :
83- name : Publish
84- needs : [build]
85- if : " !contains(github.event.head_commit.message, 'skip-ci') || startsWith(github.ref, 'refs/tags/')"
86- runs-on : ubuntu-latest
87- steps :
88- - name : Checkout
89- uses : actions/checkout@v2
90- with :
91- fetch-depth : 0
92-
93- - name : Setup dotnet
94- uses : actions/setup-dotnet@v1
95- with :
96- dotnet-version : 3.1.402
97-
98- - name : Publish
99- shell : bash
100- run : |
101- dotnet tool restore
102- dotnet cake --target="publish" \
103- --nuget-key="${{secrets.NUGET_API_KEY}}" \
1+ name : Publish
2+
3+ on :
4+ push :
5+ tags :
6+ - ' *'
7+ branches :
8+ - master
9+ paths :
10+ - ' src/**'
11+
12+ env :
13+ DOTNET_SKIP_FIRST_TIME_EXPERIENCE : true
14+ DOTNET_CLI_TELEMETRY_OPTOUT : true
15+
16+ jobs :
17+
18+ # ##################################################
19+ # DOCS
20+ # ##################################################
21+
22+ # docs:
23+ # name: Documentation
24+ # runs-on: ubuntu-latest
25+ # steps:
26+ # - name: Checkout
27+ # uses: actions/checkout@master
28+
29+ # - name: Setup dotnet
30+ # uses: actions/setup-dotnet@v1
31+ # with:
32+ # dotnet-version: '5.0.100 # SDK Version to use.
33+
34+ # - name: Build
35+ # shell: bash
36+ # env:
37+ # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+ # run: |
39+ # cd docs
40+ # dotnet run --configuration Release
41+
42+ # ##################################################
43+ # BUILD
44+ # ##################################################
45+
46+ build :
47+ name : Build
48+ # needs: [docs]
49+ if : " !contains(github.event.head_commit.message, 'skip-ci') || startsWith(github.ref, 'refs/tags/')"
50+ strategy :
51+ matrix :
52+ kind : ['linux', 'windows', 'macOS']
53+ include :
54+ - kind : linux
55+ os : ubuntu-latest
56+ - kind : windows
57+ os : windows-latest
58+ - kind : macOS
59+ os : macos-latest
60+ runs-on : ${{ matrix.os }}
61+ steps :
62+ - name : Checkout
63+ uses : actions/checkout@v2
64+ with :
65+ fetch-depth : 0
66+
67+ - name : Setup .NETCore 3.1.402
68+ uses : actions/setup-dotnet@v1
69+ with :
70+ dotnet-version : 3.1.402
71+
72+ - name : Setup .NET 5.x
73+ uses : actions/setup-dotnet@v1
74+ with :
75+ dotnet-version : 5.0.100
76+
77+ - name : Build
78+ shell : bash
79+ run : |
80+ dotnet tool restore
81+ dotnet cake
82+
83+ # ##################################################
84+ # PUBLISH
85+ # ##################################################
86+
87+ publish :
88+ name : Publish
89+ needs : [build]
90+ if : " !contains(github.event.head_commit.message, 'skip-ci') || startsWith(github.ref, 'refs/tags/')"
91+ runs-on : ubuntu-latest
92+ steps :
93+ - name : Checkout
94+ uses : actions/checkout@v2
95+ with :
96+ fetch-depth : 0
97+
98+ - name : Setup .NETCore 3.1.402
99+ uses : actions/setup-dotnet@v1
100+ with :
101+ dotnet-version : 3.1.402
102+
103+ - name : Setup .NET 5.x
104+ uses : actions/setup-dotnet@v1
105+ with :
106+ dotnet-version : 5.0.100
107+
108+ - name : Publish
109+ shell : bash
110+ run : |
111+ dotnet tool restore
112+ dotnet cake --target="publish" \
113+ --nuget-key="${{secrets.NUGET_API_KEY}}" \
104114 --github-key="${{secrets.GITHUB_TOKEN}}"
0 commit comments