-
Notifications
You must be signed in to change notification settings - Fork 43
40 lines (35 loc) · 1.19 KB
/
child-subgraph-release.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
name: Child subgraph release
on:
release:
types: [created]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- SUBGRAPH_NETWORK: mumbai
SUBGRAPH_NAME: maticnetwork/mumbai-child-subgraphs
- SUBGRAPH_NETWORK: matic
SUBGRAPH_NAME: maticnetwork/mainnet-child-subgraphs
defaults:
run:
working-directory: child
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "14"
check-latest: true
- run: npm install
- name: Prepare subgraph for ${{ matrix.SUBGRAPH_NETWORK }}
run: npm run prepare:${{ matrix.SUBGRAPH_NETWORK }}
- name: Generate code for subgraph
run: npm run codegen
- name: Build subgraph
run: npm run build
- name: Deploy subgraph
run: |
npm run graph -- deploy --access-token ${{ secrets.THE_GRAPH_ACCESS_TOKEN }} --node ${{ secrets.THE_GRAPH_NODE_URL }} --ipfs ${{ secrets.THE_GRAPH_IPFS_URL }} ${{ matrix.SUBGRAPH_NAME }}