Merge pull request #2 from dsrvlabs/feature/swap-uniswap-pool #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build & deploy | |
on: | |
push: | |
branches: | |
- '**' | |
pull_request: | |
branches: | |
- '**' | |
workflow_dispatch: | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
env: | |
STAGE_SSV_NETWORKS: > | |
[ | |
{ | |
\"networkId\": 17000, | |
\"apiVersion\": \"v4\", | |
\"apiNetwork\": \"holesky\", | |
\"api\": \"https://api.stage.ssv.network/api\", | |
\"explorerUrl\": \"https://holesky-explorer.stage.ssv.network\", | |
\"insufficientBalanceUrl\": \"https://faucet.stage.ssv.network\", | |
\"googleTagSecret\": \"${{ secrets.STAGE_GOOGLE_TAG_SECRET }}\", | |
\"tokenAddress\": \"0x68A8DDD7a59A900E0657e9f8bbE02B70c947f25F\", | |
\"setterContractAddress\": \"${{ secrets.STAGE_HOLESKY_NETWORK_SETTER_CONTRACT_ADDRESS_V4 }}\", | |
\"getterContractAddress\": \"${{ secrets.STAGE_HOLESKY_NETWORK_GETTER_CONTRACT_ADDRESS_V4 }}\" | |
} | |
] | |
PROD_SSV_NETWORKS: > | |
[ | |
{ | |
\"networkId\": 1, | |
\"apiVersion\": \"v4\", | |
\"apiNetwork\": \"mainnet\", | |
\"api\": \"https://api.ssv.network/api\", | |
\"explorerUrl\": \"https://explorer.ssv.network\", | |
\"insufficientBalanceUrl\": \"https://coinmarketcap.com/currencies/ssv-network/#Markets\", | |
\"googleTagSecret\": \"${{ secrets.PROD_GOOGLE_TAG_SECRET }}\", | |
\"distributionContract\": \"${{ secrets.PROD_DISTRIBUTION_CONTRACT_ADDRESS_MAINNET }}\", | |
\"tokenAddress\": \"0x9D65fF81a3c488d585bBfb0Bfe3c7707c7917f54\", | |
\"setterContractAddress\": \"${{ secrets.PROD_NETWORK_SETTER_CONTRACT_ADDRESS_V4_MAINNET }}\", | |
\"getterContractAddress\": \"${{ secrets.PROD_NETWORK_GETTER_CONTRACT_ADDRESS_V4_MAINNET }}\" | |
}, | |
{ | |
\"networkId\": 17000, | |
\"apiVersion\": \"v4\", | |
\"apiNetwork\": \"holesky\", | |
\"api\": \"https://api.ssv.network/api\", | |
\"explorerUrl\": \"https://holesky.explorer.ssv.network\", | |
\"insufficientBalanceUrl\": \"https://faucet.ssv.network\", | |
\"googleTagSecret\": \"${{ secrets.PROD_GOOGLE_TAG_SECRET }}\", | |
\"tokenAddress\": \"0xad45A78180961079BFaeEe349704F411dfF947C6\", | |
\"setterContractAddress\": \"${{ secrets.PROD_HOLESKY_NETWORK_SETTER_CONTRACT_ADDRESS_V4 }}\", | |
\"getterContractAddress\": \"${{ secrets.PROD_HOLESKY_NETWORK_GETTER_CONTRACT_ADDRESS_V4 }}\" | |
} | |
] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
node-version: 20.12.2 | |
path: '**/node_modules' | |
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
- name: Install packages | |
if: steps.yarn-cache.outputs.cache-hit != 'true' | |
run: yarn install | |
- name: Run lint | |
run: yarn lint | |
# <app.stage.ssv.network> | |
- name: Run stage webapp build | |
if: github.ref == 'refs/heads/stage' | |
run: > | |
GAS_PRICE="${{ env.GAS_PRICE }}" | |
GAS_LIMIT="${{ env.GAS_LIMIT }}" | |
SSV_NETWORKS="${{ env.STAGE_SSV_NETWORKS }}" | |
BLOCKNATIVE_KEY="$BLOCKNATIVE_KEY" | |
LINK_SSV_DEV_DOCS="$LINK_SSV_DEV_DOCS" | |
yarn build | |
env: | |
GAS_PRICE: ${{ secrets.GAS_PRICE }} | |
GAS_LIMIT: ${{ secrets.GAS_LIMIT }} | |
BLOCKNATIVE_KEY: ${{ secrets.BLOCKNATIVE_KEY }} | |
LINK_SSV_DEV_DOCS: ${{ secrets.LINK_SSV_DEV_DOCS }} | |
- name: Deploy stage webapp | |
if: github.ref == 'refs/heads/stage' | |
uses: jakejarvis/[email protected] | |
with: | |
args: --acl public-read --follow-symlinks --delete | |
env: | |
SOURCE_DIR: 'build/' | |
AWS_REGION: 'us-west-2' | |
AWS_S3_BUCKET: ${{ secrets.STAGE_AWS_S3_BUCKET_V4 }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.STAGE_AWS_SECRET_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.STAGE_AWS_SECRET_ACCESS_KEY }} | |
# </app.stage.ssv.network> | |
# <ilya-app.stage.ssv.network> | |
- name: Run ilya-dev webapp build | |
if: github.ref == 'refs/heads/ilya-dev' | |
run: > | |
GAS_PRICE="${{ env.GAS_PRICE }}" | |
GAS_LIMIT="${{ env.GAS_LIMIT }}" | |
SSV_NETWORKS="${{ env.STAGE_SSV_NETWORKS }}" | |
BLOCKNATIVE_KEY="$BLOCKNATIVE_KEY" | |
LINK_SSV_DEV_DOCS="$LINK_SSV_DEV_DOCS" | |
yarn build | |
env: | |
GAS_PRICE: ${{ secrets.GAS_PRICE }} | |
GAS_LIMIT: ${{ secrets.GAS_LIMIT }} | |
BLOCKNATIVE_KEY: ${{ secrets.BLOCKNATIVE_KEY }} | |
LINK_SSV_DEV_DOCS: ${{ secrets.LINK_SSV_DEV_DOCS }} | |
- name: Deploy ilya-dev webapp | |
if: github.ref == 'refs/heads/ilya-dev' | |
uses: jakejarvis/[email protected] | |
with: | |
args: --acl public-read --follow-symlinks --delete | |
env: | |
SOURCE_DIR: 'build/' | |
AWS_REGION: 'us-west-2' | |
AWS_S3_BUCKET: ${{ secrets.STAGE_AWS_S3_BUCKET_ILYA }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.STAGE_AWS_SECRET_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.STAGE_AWS_SECRET_ACCESS_KEY }} | |
# </ilya-app.stage.ssv.network> | |
# <chris-app.stage.ssv.network> | |
- name: Run chris-dev webapp build | |
if: github.ref == 'refs/heads/chris-dev' | |
run: > | |
GAS_PRICE="${{ env.GAS_PRICE }}" | |
GAS_LIMIT="${{ env.GAS_LIMIT }}" | |
SSV_NETWORKS="${{ env.STAGE_SSV_NETWORKS }}" | |
BLOCKNATIVE_KEY="$BLOCKNATIVE_KEY" | |
LINK_SSV_DEV_DOCS="$LINK_SSV_DEV_DOCS" | |
yarn build | |
env: | |
GAS_PRICE: ${{ secrets.GAS_PRICE }} | |
GAS_LIMIT: ${{ secrets.GAS_LIMIT }} | |
BLOCKNATIVE_KEY: ${{ secrets.BLOCKNATIVE_KEY }} | |
LINK_SSV_DEV_DOCS: ${{ secrets.LINK_SSV_DEV_DOCS }} | |
- name: Deploy chris-dev webapp | |
if: github.ref == 'refs/heads/chris-dev' | |
uses: jakejarvis/[email protected] | |
with: | |
args: --acl public-read --follow-symlinks --delete | |
env: | |
SOURCE_DIR: 'build/' | |
AWS_REGION: 'us-west-2' | |
AWS_S3_BUCKET: ${{ secrets.STAGE_AWS_S3_BUCKET_CHRIS }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.STAGE_AWS_SECRET_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.STAGE_AWS_SECRET_ACCESS_KEY }} | |
# </chris-app.stage.ssv.network> | |
# <dima-app.stage.ssv.network> | |
- name: Run dima-dev webapp build | |
if: github.ref == 'refs/heads/dima-dev' | |
run: > | |
GAS_PRICE="${{ env.GAS_PRICE }}" | |
GAS_LIMIT="${{ env.GAS_LIMIT }}" | |
SSV_NETWORKS="${{ env.STAGE_SSV_NETWORKS }}" | |
BLOCKNATIVE_KEY="$BLOCKNATIVE_KEY" | |
LINK_SSV_DEV_DOCS="$LINK_SSV_DEV_DOCS" | |
yarn build | |
env: | |
GAS_PRICE: ${{ secrets.GAS_PRICE }} | |
GAS_LIMIT: ${{ secrets.GAS_LIMIT }} | |
BLOCKNATIVE_KEY: ${{ secrets.BLOCKNATIVE_KEY }} | |
LINK_SSV_DEV_DOCS: ${{ secrets.LINK_SSV_DEV_DOCS }} | |
- name: Deploy dima-dev webapp | |
if: github.ref == 'refs/heads/dima-dev' | |
uses: jakejarvis/[email protected] | |
with: | |
args: --acl public-read --follow-symlinks --delete | |
env: | |
SOURCE_DIR: 'build/' | |
AWS_REGION: 'us-west-2' | |
AWS_S3_BUCKET: ${{ secrets.STAGE_AWS_S3_BUCKET_DIMA }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.STAGE_AWS_SECRET_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.STAGE_AWS_SECRET_ACCESS_KEY }} | |
# </dima-app.stage.ssv.network> | |
# <sumbat-app.stage.ssv.network> | |
- name: Run sumbat-dev webapp build | |
if: github.ref == 'refs/heads/sumbat-dev' | |
run: > | |
GAS_PRICE="${{ env.GAS_PRICE }}" | |
GAS_LIMIT="${{ env.GAS_LIMIT }}" | |
SSV_NETWORKS="${{ env.STAGE_SSV_NETWORKS }}" | |
BLOCKNATIVE_KEY="$BLOCKNATIVE_KEY" | |
LINK_SSV_DEV_DOCS="$LINK_SSV_DEV_DOCS" | |
yarn build | |
env: | |
GAS_PRICE: ${{ secrets.GAS_PRICE }} | |
GAS_LIMIT: ${{ secrets.GAS_LIMIT }} | |
BLOCKNATIVE_KEY: ${{ secrets.BLOCKNATIVE_KEY }} | |
LINK_SSV_DEV_DOCS: ${{ secrets.LINK_SSV_DEV_DOCS }} | |
- name: Deploy sumbat-dev webapp | |
if: github.ref == 'refs/heads/sumbat-dev' | |
uses: jakejarvis/[email protected] | |
with: | |
args: --acl public-read --follow-symlinks --delete | |
env: | |
SOURCE_DIR: 'build/' | |
AWS_REGION: 'us-west-2' | |
AWS_S3_BUCKET: ${{ secrets.STAGE_AWS_S3_BUCKET_SUMBAT }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.STAGE_AWS_SECRET_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.STAGE_AWS_SECRET_ACCESS_KEY }} | |
# </sumbat-app.stage.ssv.network> | |
# <beta.app.ssv.network> | |
- name: Run prod-test webapp build | |
if: github.ref == 'refs/heads/prod-test' | |
run: > | |
GAS_PRICE="${{ env.GAS_PRICE }}" | |
GAS_LIMIT="${{ env.GAS_LIMIT }}" | |
SSV_NETWORKS="${{ env.PROD_SSV_NETWORKS }}" | |
BLOCKNATIVE_KEY="$BLOCKNATIVE_KEY" | |
LINK_SSV_DEV_DOCS="$LINK_SSV_DEV_DOCS" | |
yarn build | |
env: | |
GAS_PRICE: ${{ secrets.GAS_PRICE }} | |
GAS_LIMIT: ${{ secrets.GAS_LIMIT }} | |
BLOCKNATIVE_KEY: ${{ secrets.BLOCKNATIVE_KEY }} | |
LINK_SSV_DEV_DOCS: ${{ secrets.LINK_SSV_DEV_DOCS }} | |
- name: Deploy prod-test webapp | |
if: github.ref == 'refs/heads/prod-test' | |
uses: jakejarvis/[email protected] | |
with: | |
args: --acl public-read --follow-symlinks --delete | |
env: | |
SOURCE_DIR: 'build/' | |
AWS_REGION: 'us-west-2' | |
AWS_S3_BUCKET: ${{ secrets.PROD_AWS_S3_BUCKET_TEST }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.PROD_AWS_SECRET_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.PROD_AWS_SECRET_ACCESS_KEY }} | |
# </beta.app.ssv.network> | |
# <beta.app.ssv.network> | |
- name: Run prod webapp build | |
if: github.ref == 'refs/heads/main' | |
run: > | |
GAS_PRICE="${{ env.GAS_PRICE }}" | |
GAS_LIMIT="${{ env.GAS_LIMIT }}" | |
SSV_NETWORKS="${{ env.PROD_SSV_NETWORKS }}" | |
BLOCKNATIVE_KEY="$BLOCKNATIVE_KEY" | |
LINK_SSV_DEV_DOCS="$LINK_SSV_DEV_DOCS" | |
yarn build | |
env: | |
GAS_PRICE: ${{ secrets.GAS_PRICE }} | |
GAS_LIMIT: ${{ secrets.GAS_LIMIT }} | |
BLOCKNATIVE_KEY: ${{ secrets.BLOCKNATIVE_KEY }} | |
LINK_SSV_DEV_DOCS: ${{ secrets.LINK_SSV_DEV_DOCS }} | |
- name: Deploy prod webapp | |
if: github.ref == 'refs/heads/main' | |
uses: jakejarvis/[email protected] | |
with: | |
args: --acl public-read --follow-symlinks --delete | |
env: | |
SOURCE_DIR: 'build/' | |
AWS_REGION: 'us-west-2' | |
AWS_S3_BUCKET: ${{ secrets.PROD_AWS_S3_BUCKET_V4 }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.PROD_AWS_SECRET_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.PROD_AWS_SECRET_ACCESS_KEY }} | |
# </beta.app.ssv.network> | |
# <faucet.stage.ssv.network> | |
- name: Run stage faucet build | |
if: github.ref == 'refs/heads/stage' | |
run: > | |
SSV_NETWORKS="${{ env.STAGE_SSV_NETWORKS }}" | |
GOOGLE_TAG_SECRET="$GOOGLE_TAG_SECRET" | |
EXPLORER_URL="$EXPLORER_URL" BLOCKNATIVE_KEY="$BLOCKNATIVE_KEY" yarn build | |
env: | |
VITE_FAUCET_PAGE: "true" | |
SSV_NETWORKS: ${{ env.STAGE_SSV_NETWORKS }} | |
BLOCKNATIVE_KEY: ${{ secrets.BLOCKNATIVE_KEY }} | |
EXPLORER_URL: "https://explorer.ssv.network/" | |
LINK_SSV_DEV_DOCS: ${{ secrets.LINK_SSV_DEV_DOCS }} | |
VITE_CAPTCHA_KEY: ${{ secrets.CAPTCHA_KEY_STAGE }} | |
- name: Deploy stage faucet | |
if: github.ref == 'refs/heads/stage' | |
uses: jakejarvis/[email protected] | |
with: | |
args: --acl public-read --follow-symlinks --delete | |
env: | |
SOURCE_DIR: 'build/' | |
AWS_REGION: 'us-west-2' | |
AWS_S3_BUCKET: ${{ secrets.STAGE_FAUCET_AWS_S3_BUCKET }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.STAGE_AWS_SECRET_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.STAGE_AWS_SECRET_ACCESS_KEY }} | |
# </faucet.stage.ssv.network> | |
# <claim.stage.ssv.network> | |
# - name: Run stage build claim | |
# if: github.ref == 'refs/heads/stage' | |
# run: > | |
# SSV_NETWORKS="${{ env.STAGE_SSV_NETWORKS }}" | |
# BLOCKNATIVE_KEY="$BLOCKNATIVE_KEY" PROD_CLAIM_PAGE="$PROD_CLAIM_PAGE" yarn build | |
# env: | |
# PROD_CLAIM_PAGE: "true" | |
# BLOCKNATIVE_KEY: ${{ secrets.BLOCKNATIVE_KEY }} | |
# LINK_SSV_DEV_DOCS: ${{ secrets.LINK_SSV_DEV_DOCS }} | |
# SSV_NETWORKS: ${{ env.STAGE_SSV_NETWORKS }} | |
# | |
# - name: Deploy stage claim | |
# if: github.ref == 'refs/heads/stage' | |
# uses: jakejarvis/[email protected] | |
# with: | |
# args: --acl public-read --follow-symlinks --delete | |
# env: | |
# SOURCE_DIR: 'build/' | |
# AWS_REGION: 'us-west-2' | |
# AWS_S3_BUCKET: ${{ secrets.STAGE_V2_AWS_S3_BUCKET_CLAIM }} | |
# AWS_ACCESS_KEY_ID: ${{ secrets.STAGE_AWS_SECRET_KEY_ID }} | |
# AWS_SECRET_ACCESS_KEY: ${{ secrets.STAGE_AWS_SECRET_ACCESS_KEY }} | |
# </claim.stage.ssv.network> | |
# <faucet.ssv.network> | |
- name: Run prod faucet build | |
if: github.ref == 'refs/heads/main' | |
run: > | |
SSV_NETWORKS="${{ env.PROD_SSV_NETWORKS }}" | |
GOOGLE_TAG_SECRET="$GOOGLE_TAG_SECRET" | |
EXPLORER_URL="$EXPLORER_URL" BLOCKNATIVE_KEY="$BLOCKNATIVE_KEY" yarn build | |
env: | |
VITE_FAUCET_PAGE: "true" | |
SSV_NETWORKS: ${{ env.PROD_SSV_NETWORKS }} | |
BLOCKNATIVE_KEY: ${{ secrets.BLOCKNATIVE_KEY }} | |
EXPLORER_URL: "https://explorer.ssv.network/" | |
LINK_SSV_DEV_DOCS: ${{ secrets.LINK_SSV_DEV_DOCS }} | |
VITE_CAPTCHA_KEY: ${{ secrets.CAPTCHA_KEY_STAGE }} | |
- name: Deploy prod faucet | |
if: github.ref == 'refs/heads/main' | |
uses: jakejarvis/[email protected] | |
with: | |
args: --acl public-read --follow-symlinks --delete | |
env: | |
SOURCE_DIR: 'build/' | |
AWS_REGION: 'us-west-2' | |
AWS_S3_BUCKET: ${{ secrets.PROD_FAUCET_AWS_S3_BUCKET }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.PROD_AWS_SECRET_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.PROD_AWS_SECRET_ACCESS_KEY }} | |
# </faucet.ssv.network> | |
# <claim.ssv.network> | |
# - name: Run prod build claim | |
# if: github.ref == 'refs/heads/main' | |
# run: > | |
# SSV_NETWORKS="${{ env.PROD_SSV_NETWORKS }}" | |
# BLOCKNATIVE_KEY="$BLOCKNATIVE_KEY" PROD_CLAIM_PAGE="$PROD_CLAIM_PAGE" yarn build | |
# env: | |
# PROD_CLAIM_PAGE: "true" | |
# BLOCKNATIVE_KEY: ${{ secrets.BLOCKNATIVE_KEY }} | |
# LINK_SSV_DEV_DOCS: ${{ secrets.LINK_SSV_DEV_DOCS }} | |
# SSV_NETWORKS: ${{ env.PROD_SSV_NETWORKS }} | |
# | |
# - name: Deploy prod claim | |
# if: github.ref == 'refs/heads/main' | |
# uses: jakejarvis/[email protected] | |
# with: | |
# args: --acl public-read --follow-symlinks --delete | |
# env: | |
# SOURCE_DIR: 'build/' | |
# AWS_REGION: 'us-west-2' | |
# AWS_S3_BUCKET: ${{ secrets.PROD_AWS_S3_BUCKET_CLAIM }} | |
# AWS_ACCESS_KEY_ID: ${{ secrets.PROD_AWS_SECRET_KEY_ID }} | |
# AWS_SECRET_ACCESS_KEY: ${{ secrets.PROD_AWS_SECRET_ACCESS_KEY }} | |
# </claim.ssv.network> |