-
-
Notifications
You must be signed in to change notification settings - Fork 663
60 lines (49 loc) · 1.62 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
name: 📦 Build
on:
push:
branches: [dev]
pull_request:
branches: [dev]
permissions:
contents: read
jobs:
build:
if: github.repository == 'dream-num/univer'
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.head_ref }}
- name: Setup Node.js
uses: ./.github/actions/setup-node
- name: 📦 Build
run: pnpm build:ci
set-pr-info:
name: set PR info
runs-on: ubuntu-latest
steps:
- name: Save PR info
run: |
echo ${{ github.event.pull_request.number }} > ./pr-id.txt
echo ${{ github.head_ref }} >> ./pr-ref.txt
echo ${{ github.event.pull_request.head.repo.full_name || github.repository }} >> ./pr-repo.txt
- name: Upload PR number
uses: actions/upload-artifact@v3
with:
name: pr-id
path: ./pr-id.txt
- name: Upload PR ref
uses: actions/upload-artifact@v3
with:
name: pr-ref
path: ./pr-ref.txt
- name: Upload PR repo
uses: actions/upload-artifact@v3
with:
name: pr-repo
path: ./pr-repo.txt