This repository has been archived by the owner on May 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
144 lines (119 loc) · 3.27 KB
/
build.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
on:
push:
pull_request:
workflow_dispatch:
jobs:
build-api-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
mkdir -p site/
- uses: docker://asyncapi/github-action-for-generator:2.1.12
with:
filepath: docs/api/asyncapi.yaml
template: '@asyncapi/[email protected]'
output: site/
- uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}-api-docs-${{ github.sha }}
path: site/
build-host:
strategy:
matrix:
runtime:
- linux-arm
- linux-arm64
- ubuntu-x64
- win-arm64
- win-x64
- win-x86
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- run: |
dotnet publish src/EdcHost/EdcHost.csproj -c Release -o bin \
--sc false -r ${{ matrix.runtime }} -p:DebugType=none \
-p:PublishSingleFile=true
working-directory: host
- uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}-host-${{ matrix.runtime }}-${{ github.sha }}
path: host/bin
build-viewer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
- run: |
npm ci
working-directory: viewer
- run: |
npm run build
working-directory: viewer
- uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}-viewer-${{ github.sha }}
path: viewer/build
build-pages:
needs:
- build-api-docs
- build-viewer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: api-docs-${{ github.sha }}
path: site/api
- uses: actions/download-artifact@v4
with:
name: ${{ github.event.repository.name }}-viewer-${{ github.sha }}
path: site/viewer
- uses: actions/upload-pages-artifact@v3
with:
path: site
check-style-host:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- run: dotnet format --verify-no-changes src/EdcHost
working-directory: host
- run: dotnet format --verify-no-changes src/EdcHost.Tests
working-directory: host
deploy-pages:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build-pages
permissions:
id-token: write
pages: write
runs-on: ubuntu-latest
steps:
- id: deployment
uses: actions/deploy-pages@v4
test-host:
strategy:
matrix:
runs-on:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- run: |
dotnet test src/EdcHost.Tests/EdcHost.Tests.csproj
working-directory: host