File tree 2 files changed +48
-12
lines changed
2 files changed +48
-12
lines changed Original file line number Diff line number Diff line change 12
12
matrix :
13
13
node : ['14.x']
14
14
os : [ubuntu-latest]
15
- network : ['mainnet ', 'goerli ']
15
+ network : ['goerli ', 'mainnet ']
16
16
17
17
runs-on : ${{ matrix.os }}
18
18
Original file line number Diff line number Diff line change 8
8
- " v*"
9
9
10
10
jobs :
11
- docker :
12
- name : Deploy Subgraphs
13
- runs-on : ubuntu-latest
14
- container : node:16-alpine
11
+ deploy :
12
+ strategy :
13
+ matrix :
14
+ os : [ubuntu-latest]
15
+ network : ['goerli', 'mainnet']
16
+
17
+ runs-on : ${{ matrix.os }}
18
+
15
19
steps :
16
20
- name : Checkout code
17
21
uses : actions/checkout@v2
18
- - run : |
19
- yarn install
20
- yarn prepare:mainnet
21
- yarn run codegen
22
- yarn run build
22
+
23
+ - name : Setup Node
24
+ uses : actions/setup-node@v2
25
+ with :
26
+ node-version : 14.x
27
+
28
+ - name : Get yarn cache directory path
29
+ id : yarn-cache-dir-path
30
+ run : echo "::set-output name=dir::$(yarn cache dir)"
31
+
32
+ - uses : actions/cache@v2
33
+ id : yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
34
+ with :
35
+ path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
36
+ key : ${{ matrix.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
37
+ restore-keys : |
38
+ ${{ matrix.os }}-yarn-
39
+
40
+ - name : Install dependencies
41
+ run : yarn install
42
+
43
+ - name : Run network prepare
44
+ env :
45
+ NETWORK : ${{ matrix.network }}
46
+ run : yarn prepare:$NETWORK
47
+
48
+ - name : Run codegen
49
+ run : yarn run codegen
50
+
51
+ - name : Build project
52
+ run : yarn run build
53
+
54
+ - name : Install Graph CLI
55
+ run : |
23
56
yarn global add @graphprotocol/graph-cli
24
57
graph auth https://api.thegraph.com/deploy/ ${{ secrets.THEGRAPH_TOKEN }}
25
- yarn deploy:mainnet
26
- name: Deploy
58
+
59
+ - name : Deploy Subgraphs
60
+ env :
61
+ NETWORK : ${{ matrix.network }}
62
+ run : yarn deploy:$NETWORK
You can’t perform that action at this time.
0 commit comments