From f352f16263f373d73b680eabe9ac8334b4df4085 Mon Sep 17 00:00:00 2001 From: juanmardefago Date: Wed, 8 Nov 2023 01:01:04 -0300 Subject: [PATCH] feat: added gh workflows for sepolia/arb-sepolia --- .../deploy-arbitrum-sepolia-subgraph.yaml | 35 +++++++++++++++++++ .../workflows/deploy-sepolia-subgraph.yaml | 35 +++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 .github/workflows/deploy-arbitrum-sepolia-subgraph.yaml create mode 100644 .github/workflows/deploy-sepolia-subgraph.yaml diff --git a/.github/workflows/deploy-arbitrum-sepolia-subgraph.yaml b/.github/workflows/deploy-arbitrum-sepolia-subgraph.yaml new file mode 100644 index 0000000..419c547 --- /dev/null +++ b/.github/workflows/deploy-arbitrum-sepolia-subgraph.yaml @@ -0,0 +1,35 @@ +name: Testnet Subgraph L2 (Arbitrum-Sepolia) + +on: + push: + tags: + - v* + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + # Install commands + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '20' + registry-url: https://registry.npmjs.org + - name: yarn add ts-node + run: yarn add ts-node + - name: yarn install + run: yarn install + env: + NODE_AUTH_TOKEN: ${{secrets.graphprotocol_npm_token}} + + # Run scripts + - name: Prepare addresses arbitrum goerli + run: ./node_modules/.bin/ts-node config/arbitrumSepoliaAddressScript.ts && ./node_modules/.bin/mustache ./config/generatedAddresses.json ./config/addresses.template.ts > ./config/addresses.ts + - name: Prepare arbitrum goerli + run: ./node_modules/.bin/mustache ./config/generatedAddresses.json subgraph.template.yaml > subgraph.yaml && ./node_modules/@graphprotocol/graph-cli/bin/run codegen --output-dir src/types/ + - name: Deploy to testnet rinkeby + run: ./node_modules/@graphprotocol/graph-cli/bin/run deploy graphprotocol/graph-analytics-arb-sepolia --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/ --access-token ${{secrets.access_token}} diff --git a/.github/workflows/deploy-sepolia-subgraph.yaml b/.github/workflows/deploy-sepolia-subgraph.yaml new file mode 100644 index 0000000..b019073 --- /dev/null +++ b/.github/workflows/deploy-sepolia-subgraph.yaml @@ -0,0 +1,35 @@ +name: Testnet Subgraph (Sepolia) + +on: + push: + tags: + - v* + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + # Install commands + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '20' + registry-url: https://registry.npmjs.org + - name: yarn add ts-node + run: yarn add ts-node + - name: yarn install + run: yarn install + env: + NODE_AUTH_TOKEN: ${{secrets.graphprotocol_npm_token}} + + # Run scripts + - name: Prepare addresses Sepolia + run: ./node_modules/.bin/ts-node config/sepoliaAddressScript.ts && ./node_modules/.bin/mustache ./config/generatedAddresses.json ./config/addresses.template.ts > ./config/addresses.ts + - name: Prepare rinkeby + run: ./node_modules/.bin/mustache ./config/generatedAddresses.json subgraph.template.yaml > subgraph.yaml && ./node_modules/@graphprotocol/graph-cli/bin/run codegen --output-dir src/types/ + - name: Deploy to testnet rinkeby + run: ./node_modules/@graphprotocol/graph-cli/bin/run deploy graphprotocol/graph-analytics-sepolia --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/ --access-token ${{secrets.access_token}}