Skip to content

Commit 18b2cc2

Browse files
committed
Use goldsky as prod
1 parent d201a3d commit 18b2cc2

File tree

3 files changed

+13
-20
lines changed

3 files changed

+13
-20
lines changed

.github/workflows/Release.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release
1+
name: Release PROD
22

33
on:
44
push:
@@ -7,7 +7,7 @@ on:
77
- "*.*.*" # Push events to matching x.x.x tags, e.g. 1.0.0, 1.4.5, etc
88

99
jobs:
10-
deploy_to_0xgraph:
10+
Release_PROD:
1111
strategy:
1212
matrix:
1313
node: ["21.x"]
@@ -17,6 +17,9 @@ jobs:
1717
runs-on: ${{ matrix.os }}
1818

1919
steps:
20+
- name: Install Goldsky CLI
21+
run: curl -fsSL https://cli.goldsky.com/install | FORCE=1 bash
22+
2023
- name: Checkout code
2124
uses: actions/checkout@v2
2225

@@ -40,5 +43,5 @@ jobs:
4043
- name: Install dependencies
4144
run: yarn install
4245

43-
- name: Deploy to 0xgraph
44-
run: ./bin/release.sh ${{ github.ref_name }} ${{ matrix.chain }} 0xgraph ${{ secrets.OXGRAPH_TOKEN }}
46+
- name: Deploy to Goldsky
47+
run: ./bin/release.sh ${{ github.ref_name }} ${{ matrix.chain }} goldsky ${{ secrets.GOLDSKY_TOKEN }}

bin/deploy.sh

+2-12
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,12 @@ function publish_goldsky {
4141
function publish {
4242
CHAIN=$1
4343
PROVIDER=$2
44-
SUBGRAPH=beefyfinance/l2-lxp-liquidity-$CHAIN
4544
case $PROVIDER in
4645
"0xgraph")
47-
publish_0xgraph $SUBGRAPH
46+
publish_0xgraph beefyfinance/l2-lxp-liquidity-$CHAIN
4847
;;
4948
"goldsky")
50-
publish_goldsky $SUBGRAPH
49+
publish_goldsky beefy-l2-lxp-liquidity-$CHAIN-dev
5150
;;
5251
esac
5352
}
@@ -58,15 +57,6 @@ if [ -z "$chain" ]; then
5857
echo "chain is required"
5958
exit_help
6059
fi
61-
# deploy all chains
62-
if [ "$chain" == "all" ]; then
63-
shift
64-
for chain in ${valid_chains[@]}; do
65-
echo "==== deploying $chain: $0 $chain $@"
66-
$0 $chain $@
67-
done
68-
exit 0
69-
fi
7060
if [[ ! " ${valid_chains[@]} " =~ " ${chain} " ]]; then
7161
echo "invalid chain"
7262
exit_help

bin/release.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,21 @@ function publish_goldsky {
3535
VERSION=$2
3636
DEPLOY_KEY=$3
3737
echo "publishing $SUBGRAPH to goldsky"
38-
goldsky subgraph deploy $SUBGRAPH/$VERSION --path .
38+
goldsky subgraph deploy $SUBGRAPH/$VERSION --path . --token $DEPLOY_KEY
3939
}
4040

4141
function publish {
4242
VERSION=$1
4343
CHAIN=$2
4444
PROVIDER=$3
4545
DEPLOY_KEY=$4
46-
SUBGRAPH=beefyfinance/l2-lxp-liquidity-$CHAIN
46+
SUBGRAPH=
4747
case $PROVIDER in
4848
"0xgraph")
49-
publish_0xgraph $SUBGRAPH $VERSION $DEPLOY_KEY
49+
publish_0xgraph beefyfinance/l2-lxp-liquidity-$CHAIN $VERSION $DEPLOY_KEY
5050
;;
5151
"goldsky")
52-
publish_goldsky $SUBGRAPH $VERSION $DEPLOY_KEY
52+
publish_goldsky beefy-l2-lxp-liquidity-$CHAIN $VERSION $DEPLOY_KEY
5353
;;
5454
esac
5555
}

0 commit comments

Comments
 (0)