-
Notifications
You must be signed in to change notification settings - Fork 48
76 lines (62 loc) · 1.9 KB
/
prBuild.yaml
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
name: Build Extension Pull Request
on:
pull_request_target:
branches:
- main
paths:
- 'extensions/*/*.json'
jobs:
build:
runs-on: ubuntu-20.04
steps:
- run: |
echo "JAVA_HOME=$JAVA_HOME_17_X64" >> $GITHUB_ENV
echo "$JAVA_HOME_17_X64/bin" >> $GITHUB_PATH
- run: |
curl -sLO https://download.clojure.org/install/linux-install-1.11.1.1113.sh
chmod +x linux-install-1.11.1.1113.sh
sudo ./linux-install-1.11.1.1113.sh
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: clojure -P
name: Fetch deps
- name: Build PR Extension
env:
PR: ${{ github.event.pull_request.number }}
run: |
./script/build.sh --pr $PR
- uses: actions/upload-artifact@v4
with:
name: checkout
path: |
checkout/*/README.md
checkout/*/CHANGELOG.md
checkout/*/extension.js
checkout/*/extension.css
publish:
needs: build
runs-on: ubuntu-20.04
steps:
- run: |
echo "JAVA_HOME=$JAVA_HOME_17_X64" >> $GITHUB_ENV
echo "$JAVA_HOME_17_X64/bin" >> $GITHUB_PATH
- run: |
curl -sLO https://download.clojure.org/install/linux-install-1.11.1.1113.sh
chmod +x linux-install-1.11.1.1113.sh
sudo ./linux-install-1.11.1.1113.sh
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/download-artifact@v4
with:
name: checkout
path: checkout
- run: echo $FIREBASE_SERVICE_KEY > ./firebase-key.json
env:
FIREBASE_SERVICE_KEY: ${{ secrets.FIREBASE_SERVICE_KEY }}
- run: clojure -P -M:firebase
name: Fetch deps
- run: ./script/publish.sh --key ./firebase-key.json --pr $PR
env:
PR: ${{ github.event.pull_request.number }}