-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (35 loc) · 1.18 KB
/
cicd.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
name: CICD
on:
push:
pull_request:
workflow_dispatch:
jobs:
calc-variables:
if: github.ref_type == 'tag' || github.ref_name == 'main'
uses: ./.github/workflows/_calc-variables.yml
test:
uses: ./.github/workflows/_test.yml
secrets: inherit
codeql:
if: ${{ github.ref_type=='tag' || github.ref_name=='main' }}
uses: ./.github/workflows/_codeql.yml
docfx:
if: ${{ github.ref_type=='tag' || github.ref_name=='main' }}
needs: [test, codeql]
uses: ./.github/workflows/_docfx.yml
secrets: inherit
nuget:
if: ${{ github.ref_type=='tag' || github.ref_name=='main' }}
needs: [calc-variables, test, codeql]
uses: ./.github/workflows/_nuget.yml
secrets: inherit
with:
package-version: ${{ needs.calc-variables.outputs.package-version }}
packages-directory: ${{ needs.calc-variables.outputs.packages-directory }}
create-release:
if: ${{ github.ref_type=='tag' || github.ref_name=='main' }}
needs: [calc-variables, nuget]
uses: ./.github/workflows/_create-release.yml
with:
tag-name: ${{ github.tag_name || needs.calc-variables.outputs.version }}
version: ${{ needs.calc-variables.outputs.version }}