-
Notifications
You must be signed in to change notification settings - Fork 2
64 lines (62 loc) · 1.96 KB
/
vs-subgraph-ci-goldsky.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
61
62
63
64
name: Deploy VestingScheduler Subgraphs (Goldsky)
on:
workflow_dispatch:
push:
branches:
- "release-v1/*"
paths:
- "subgraphs/vesting-scheduler/**"
jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: subgraphs/vesting-scheduler
strategy:
fail-fast: false
matrix:
networks:
[
"avalanche-c",
"arbitrum-one",
"bsc-mainnet",
"eth-mainnet",
"xdai-mainnet",
"optimism-mainnet",
"polygon-mainnet",
"optimism-sepolia",
"base-mainnet"
]
steps:
- uses: actions/checkout@v4
- name: Install node
uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Install
run: pnpm install
- name: Generate YAML & Types
run: pnpm gen
- name: Build
run: pnpm exec graph build ${{format('./{0}.subgraph.yaml', matrix.networks)}}
- name: Test
run: pnpm test
- name: Get Version
id: get-version
uses: actions/github-script@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const fs = require('fs');
const packageJson = JSON.parse(fs.readFileSync('package.json'));
return packageJson.version;
- name: Goldsky Login
run: pnpm exec goldsky login --token ${{secrets.GOLDSKY_API_KEY}}
- name: Goldsky Deploy
run: pnpm exec goldsky subgraph deploy ${{format('vesting-v1-{0}/{1}', matrix.networks, steps.get-version.outputs.result) }} --path ./build
continue-on-error: true # We still want to tag the latest deployment if it was already deployed.
- name: Goldsky Tag
run: pnpm exec goldsky subgraph tag create ${{format('vesting-v1-{0}/{1}', matrix.networks, steps.get-version.outputs.result) }} --tag prod