-
Notifications
You must be signed in to change notification settings - Fork 653
152 lines (136 loc) · 3.55 KB
/
ci.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
name: CI
on:
push:
branches:
- main
- 'fix/*'
- 'feature/*'
- 'poc/*'
- 'support/*'
paths:
- '**'
- '!docs/**'
pull_request:
branches:
- main
- 'support/*'
paths:
- '**'
- '!docs/**'
merge_group:
types: [checks_requested]
repository_dispatch:
types: [ ci-release ]
env:
DOTNET_ROLL_FORWARD: "Major"
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: 1
ENABLED_DIAGNOSTICS: ${{ secrets.ENABLED_DIAGNOSTICS }}
permissions:
contents: read
packages: write
jobs:
prepare:
name: Prepare
uses: ./.github/workflows/_prepare.yml
build:
name: Build & Package
needs: [ prepare ]
uses: ./.github/workflows/_build.yml
unit_test:
name: Test
needs: [ prepare ]
uses: ./.github/workflows/_unit_tests.yml
secrets: inherit
artifacts_windows_test:
name: Artifacts Windows
needs: [ build ]
uses: ./.github/workflows/_artifacts_windows.yml
artifacts_linux_test:
needs: [ build ]
name: Artifacts Linux (${{ matrix.arch }})
strategy:
fail-fast: false
matrix:
include:
- arch: amd64
runner: ubuntu-latest
- arch: arm64
runner: ubuntu-latest
uses: ./.github/workflows/_artifacts_linux.yml
with:
runner: ${{ matrix.runner }}
arch: ${{ matrix.arch }}
docker_linux_images:
needs: [ build ]
name: Docker Images (${{ matrix.arch }})
strategy:
fail-fast: false
matrix:
include:
- arch: amd64
runner: ubuntu-latest
- arch: arm64
runner: ubuntu-latest
uses: ./.github/workflows/_docker.yml
with:
runner: ${{ matrix.runner }}
arch: ${{ matrix.arch }}
secrets: inherit
docker_linux_manifests:
needs: [ docker_linux_images ]
name: Docker Manifests
uses: ./.github/workflows/_docker_manifests.yml
secrets: inherit
publish:
name: Publish
needs: [ artifacts_windows_test, artifacts_linux_test ]
uses: ./.github/workflows/_publish.yml
secrets: inherit
release:
name: Release
needs: [ publish, docker_linux_manifests ]
runs-on: windows-latest
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
steps:
-
name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Restore State
uses: ./.github/actions/artifacts-restore
-
uses: actions/download-artifact@v4
name: Download native linux packages
with:
name: native-Linux
path: ${{ github.workspace }}/artifacts/packages/native
-
uses: actions/download-artifact@v4
name: Download native windows packages
with:
name: native-Windows
path: ${{ github.workspace }}/artifacts/packages/native
-
uses: actions/download-artifact@v4
name: Download native macos packages
with:
name: native-macOS
path: ${{ github.workspace }}/artifacts/packages/native
-
name: '[Release]'
shell: pwsh
run: dotnet run/release.dll --target=PublishRelease
-
name: '[Publish Release]'
if: ${{ github.event_name == 'repository_dispatch' }}
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.RELEASE_GITHUB_TOKEN }}
repository: ${{ github.repository }}
event-type: publish-release
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "tag": "${{ github.event.client_payload.tag }}"}'