diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index 0eebd88..73e6f61 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -1,4 +1,4 @@ -name: Release +name: Release PROD on: push: @@ -7,7 +7,7 @@ on: - "*.*.*" # Push events to matching x.x.x tags, e.g. 1.0.0, 1.4.5, etc jobs: - deploy_to_0xgraph: + Release_PROD: strategy: matrix: node: ["21.x"] @@ -17,6 +17,9 @@ jobs: runs-on: ${{ matrix.os }} steps: + - name: Install Goldsky CLI + run: curl -fsSL https://cli.goldsky.com/install | FORCE=1 bash + - name: Checkout code uses: actions/checkout@v2 @@ -40,5 +43,5 @@ jobs: - name: Install dependencies run: yarn install - - name: Deploy to 0xgraph - run: ./bin/release.sh ${{ github.ref_name }} ${{ matrix.chain }} 0xgraph ${{ secrets.OXGRAPH_TOKEN }} + - name: Deploy to Goldsky + run: ./bin/release.sh ${{ github.ref_name }} ${{ matrix.chain }} goldsky ${{ secrets.GOLDSKY_TOKEN }} diff --git a/bin/deploy.sh b/bin/deploy.sh index 0f5f9a8..e9f277d 100755 --- a/bin/deploy.sh +++ b/bin/deploy.sh @@ -41,13 +41,12 @@ function publish_goldsky { function publish { CHAIN=$1 PROVIDER=$2 - SUBGRAPH=beefyfinance/lrt-$CHAIN case $PROVIDER in "0xgraph") - publish_0xgraph $SUBGRAPH + publish_0xgraph beefyfinance/lrt-$CHAIN ;; "goldsky") - publish_goldsky $SUBGRAPH + publish_goldsky beefy-lrt-$CHAIN-dev ;; esac } @@ -58,15 +57,6 @@ if [ -z "$chain" ]; then echo "chain is required" exit_help fi -# deploy all chains -if [ "$chain" == "all" ]; then - shift - for chain in ${valid_chains[@]}; do - echo "==== deploying $chain: $0 $chain $@" - $0 $chain $@ - done - exit 0 -fi if [[ ! " ${valid_chains[@]} " =~ " ${chain} " ]]; then echo "invalid chain" exit_help diff --git a/bin/release.sh b/bin/release.sh index cd9157b..497c20d 100755 --- a/bin/release.sh +++ b/bin/release.sh @@ -35,7 +35,7 @@ function publish_goldsky { VERSION=$2 DEPLOY_KEY=$3 echo "publishing $SUBGRAPH to goldsky" - goldsky subgraph deploy $SUBGRAPH/$VERSION --path . + goldsky subgraph deploy $SUBGRAPH/$VERSION --path . --token $DEPLOY_KEY } function publish { @@ -43,13 +43,13 @@ function publish { CHAIN=$2 PROVIDER=$3 DEPLOY_KEY=$4 - SUBGRAPH=beefyfinance/lrt-$CHAIN + SUBGRAPH= case $PROVIDER in "0xgraph") - publish_0xgraph $SUBGRAPH $VERSION $DEPLOY_KEY + publish_0xgraph beefyfinance/lrt-$CHAIN $VERSION $DEPLOY_KEY ;; "goldsky") - publish_goldsky $SUBGRAPH $VERSION $DEPLOY_KEY + publish_goldsky beefy-lrt-$CHAIN $VERSION $DEPLOY_KEY ;; esac }