forked from ant-design-blazor/ant-design-blazor
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (55 loc) · 1.64 KB
/
preview-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
# Each PR will build preview site that help to check code is work as expect.
name: Preview Build
on: pull_request
jobs:
build-site:
name: build preview
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@master
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.100
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.101
- name: Setup .NET 7.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.100
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: "10.x"
- name: Prepare AOT workload
run: |
dotnet workload install wasm-tools
- name: build site
id: site
run: |
dotnet --list-sdks
npm install
dotnet build
sed -i s/{version}/$PACKAGE_VERSION/g ./site/AntDesign.Docs/Shared/HeaderMenu.razor
dotnet publish ./site/AntDesign.Docs.Wasm -c Release -f net7 -o _site
env:
PACKAGE_VERSION: ${{ github.event.number }}
- name: upload site artifact
uses: actions/upload-artifact@v2
with:
name: site
path: _site/wwwroot/
retention-days: 5
# Upload PR id for next workflow use
- name: Save PR number
if: ${{ always() }}
run: echo ${{ github.event.number }} > ./pr-id.txt
- name: Upload PR number
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: pr
path: ./pr-id.txt