-
Notifications
You must be signed in to change notification settings - Fork 88
50 lines (44 loc) · 1.5 KB
/
build-fork.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
name: Build PR From Fork
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
on:
pull_request:
branches: ["master"]
jobs:
build:
runs-on: ubuntu-latest
if: | # check if PR opened from fork
github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3.0.0
with:
persist-credentials: false
- name: Build packages
uses: ./.github/actions/build
- name: Save SHA of commit
if: github.event.number
shell: sh
run: |
mkdir -p ./__pr
echo ${{ github.event.pull_request.head.sha }} > ./__pr/SHA
echo ${{ github.event.number }} > ./__pr/NUM
- name: store PR info
if: github.event.number
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 # v3.0.0
with:
name: pr
path: __pr/
retention-days: 10
- name: Store math-utils build
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 # v3.0.0
with:
name: math-utils
path: packages/math-utils/dist
retention-days: 10
- name: Store contract-helpers build
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 # v3.0.0
with:
name: contract-helpers
path: packages/contract-helpers/dist
retention-days: 10