Skip to content

Commit

Permalink
Merge branch 'roles-mod-app' of github.com:gnosis/zodiac-modifier-rol…
Browse files Browse the repository at this point in the history
…es into roles-mod-app

# Conflicts:
#	packages/app/public/logo192.png
#	packages/app/public/logo512.png
  • Loading branch information
carlosfebres committed Apr 20, 2022
2 parents 7072fa9 + 88a2d36 commit 1cc8bc6
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 66 deletions.
59 changes: 39 additions & 20 deletions .github/workflows/dev-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Dev Continuous Deployment

on:
push:
branches: master
branches: main

env:
REACT_APP_ETHERSCAN_KEY: ${{ secrets.REACT_APP_ETHERSCAN_KEY }}
Expand All @@ -25,20 +25,39 @@ jobs:
- run: npm install -g yarn
- run: yarn install --frozen-lockfile
- run: yarn build
- name: Setup fleek config file
run: cp ./.fleek.dev.json ./.fleek.json
working-directory: packages/app
- name: Deploy site
working-directory: packages/app
id: deploy
uses: fleekhq/action-deploy@v1

- name: Pin to IPFS
id: upload
uses: anantaramdas/ipfs-pinata-deploy-action@39bbda1ce1fe24c69c6f57861b8038278d53688d
with:
pin-name: Zodiac Roles App - Latest — ${ GITHUB_SHA }
path: "./packages/app/build"
pinata-api-key: ${{ secrets.PINATA_API_KEY }}
pinata-secret-api-key: ${{ secrets.PINATA_API_SECRET_KEY }}

- name: Convert CIDv0 to CIDv1
id: convert_cidv0
uses: uniswap/convert-cidv0-cidv1@v1.0.0
with:
apiKey: ${{ secrets.FLEEK_API_KEY }}
- name: Get the output url
run: echo "Deploy url is ${{ steps.deploy.outputs.deployUrl }}"
cidv0: ${{ steps.upload.outputs.hash }}

- name: Update DNS with new IPFS hash
env:
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
RECORD_DOMAIN: "gnosisguild.org"
RECORD_NAME: "_dnslink.roles.dev"
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
uses: textileio/cloudflare-update-dnslink@0fe7b7a1ffc865db3a4da9773f0f987447ad5848
with:
cid: ${{ steps.upload.outputs.hash }}

- name: Get IPFS url
run: echo "IPFS gateways — https://${{ steps.convert_cidv0.outputs.cidv1 }}.ipfs.dweb.link/ or https://${{ steps.convert_cidv0.outputs.cidv1 }}.ipfs.cf-ipfs.com/"

- name: Prep graph cli for deployment
working-directory: packages/subgraph
run: yarn run graph auth --product hosted-service ${{ secrets.GRAPH_ACCESS_TOKEN }}

- name: Deploy subgraphs
working-directory: packages/subgraph
env:
Expand All @@ -50,12 +69,12 @@ jobs:
HOSTED_SERVICE_SUBGRAPH__MAINNET: samepant/zodiac-roles-mod-mainnet
HOSTED_SERVICE_SUBGRAPH__OPTIMISM: samepant/zodiac-roles-mod-optimism
HOSTED_SERVICE_SUBGRAPH__POLYGON: samepant/zodiac-roles-mod-polygon
run: |
yarn deploy:arbitrum-one
yarn deploy:gnosis-chain
yarn deploy:rinkeby
yarn deploy:avalanche
yarn deploy:bsc
yarn deploy:mainnet
yarn deploy:optimism
yarn deploy:polygon
run: |
yarn deploy:arbitrum-one
yarn deploy:gnosis-chain
yarn deploy:rinkeby
yarn deploy:avalanche
yarn deploy:bsc
yarn deploy:mainnet
yarn deploy:optimism
yarn deploy:polygon
53 changes: 43 additions & 10 deletions .github/workflows/prod-release-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,53 @@ jobs:
- run: npm install -g yarn
- run: yarn install --frozen-lockfile
- run: yarn build
- name: Setup fleek config file
run: cp ./.fleek.prod.json ./.fleek.json
working-directory: packages/app
- name: Deploy site
working-directory: packages/app
id: deploy
uses: fleekhq/action-deploy@v1

- name: Pin to IPFS
id: upload
uses: anantaramdas/ipfs-pinata-deploy-action@39bbda1ce1fe24c69c6f57861b8038278d53688d
with:
pin-name: Zodiac Roles App - Prod — ${ GITHUB_SHA }
path: './packages/app/build'
pinata-api-key: ${{ secrets.PINATA_API_KEY }}
pinata-secret-api-key: ${{ secrets.PINATA_API_SECRET_KEY }}

- name: Convert CIDv0 to CIDv1
id: convert_cidv0
uses: uniswap/convert-cidv0-cidv1@v1.0.0
with:
cidv0: ${{ steps.upload.outputs.hash }}

- name: Update DNS with new IPFS hash
env:
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
RECORD_DOMAIN: 'gnosisguild.org'
RECORD_NAME: '_dnslink.roles'
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
uses: textileio/cloudflare-update-dnslink@0fe7b7a1ffc865db3a4da9773f0f987447ad5848
with:
apiKey: ${{ secrets.FLEEK_API_KEY }}
- name: Get the output url
run: echo "Deploy url is ${{ steps.deploy.outputs.deployUrl }}"
cid: ${{ steps.upload.outputs.hash }}

- name: update release
id: update_release
uses: tubone24/update_release@v1.3.1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
is_append_body: true
body: |
<br />
IPFS hash of the deployment:
- CIDv0: `${{ steps.upload.outputs.hash }}`
- CIDv1: `${{ steps.convert_cidv0.outputs.cidv1 }}`
IPFS gateways:
- https://${{ steps.convert_cidv0.outputs.cidv1 }}.ipfs.dweb.link/
- https://${{ steps.convert_cidv0.outputs.cidv1 }}.ipfs.cf-ipfs.com/
- name: Prep graph cli for deployment
working-directory: packages/subgraph
run: yarn run graph auth --product hosted-service ${{ secrets.GRAPH_ACCESS_TOKEN }}

- name: Deploy subgraphs
working-directory: packages/subgraph
env:
Expand Down
14 changes: 0 additions & 14 deletions packages/app/.fleek.dev.json

This file was deleted.

14 changes: 0 additions & 14 deletions packages/app/.fleek.prod.json

This file was deleted.

Binary file modified packages/app/public/favicon.ico
Binary file not shown.
16 changes: 8 additions & 8 deletions packages/subgraph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
"prebuild": "yarn prepare:gnosis-chain && yarn getabi:permissions && yarn getabi:roles && yarn codegen",
"fmt": "prettier '(test|src)/**/*.ts' -w",
"pre-commit": "yarn fmt",
"deploy:arbitrum-one": "yarn prepare:arbitrum-one && bash -c 'source .env && graph deploy --node https://api.thegraph.com/deploy/ $HOSTED_SERVICE_SUBGRAPH__ARBITRUM_ONE'",
"deploy:gnosis-chain": "yarn prepare:gnosis-chain && bash -c 'source .env && graph deploy --node https://api.thegraph.com/deploy/ $HOSTED_SERVICE_SUBGRAPH__GNOSIS_CHAIN'",
"deploy:rinkeby": "yarn prepare:rinkeby && bash -c 'source .env && graph deploy --node https://api.thegraph.com/deploy/ $HOSTED_SERVICE_SUBGRAPH__RINKEBY'",
"deploy:avalanche": "yarn prepare:avalanche && bash -c 'source .env && graph deploy --node https://api.thegraph.com/deploy/ $HOSTED_SERVICE_SUBGRAPH__AVALANCHE'",
"deploy:bsc": "yarn prepare:bsc && bash -c 'source .env && graph deploy --node https://api.thegraph.com/deploy/ $HOSTED_SERVICE_SUBGRAPH__BSC'",
"deploy:mainnet": "yarn prepare:mainnet && bash -c 'source .env && graph deploy --node https://api.thegraph.com/deploy/ $HOSTED_SERVICE_SUBGRAPH__MAINNET'",
"deploy:optimism": "yarn prepare:optimism && bash -c 'source .env && graph deploy --node https://api.thegraph.com/deploy/ $HOSTED_SERVICE_SUBGRAPH__OPTIMISM'",
"deploy:polygon": "yarn prepare:polygon && bash -c 'source .env && graph deploy --node https://api.thegraph.com/deploy/ $HOSTED_SERVICE_SUBGRAPH__POLYGON'",
"deploy:arbitrum-one": "yarn prepare:arbitrum-one && bash -c 'source .env || true && graph deploy --node https://api.thegraph.com/deploy/ $HOSTED_SERVICE_SUBGRAPH__ARBITRUM_ONE'",
"deploy:gnosis-chain": "yarn prepare:gnosis-chain && bash -c 'source .env || true && graph deploy --node https://api.thegraph.com/deploy/ $HOSTED_SERVICE_SUBGRAPH__GNOSIS_CHAIN'",
"deploy:rinkeby": "yarn prepare:rinkeby && bash -c 'source .env || true && graph deploy --node https://api.thegraph.com/deploy/ $HOSTED_SERVICE_SUBGRAPH__RINKEBY'",
"deploy:avalanche": "yarn prepare:avalanche && bash -c 'source .env || true && graph deploy --node https://api.thegraph.com/deploy/ $HOSTED_SERVICE_SUBGRAPH__AVALANCHE'",
"deploy:bsc": "yarn prepare:bsc && bash -c 'source .env || true && graph deploy --node https://api.thegraph.com/deploy/ $HOSTED_SERVICE_SUBGRAPH__BSC'",
"deploy:mainnet": "yarn prepare:mainnet && bash -c 'source .env || true && graph deploy --node https://api.thegraph.com/deploy/ $HOSTED_SERVICE_SUBGRAPH__MAINNET'",
"deploy:optimism": "yarn prepare:optimism && bash -c 'source .env || true && graph deploy --node https://api.thegraph.com/deploy/ $HOSTED_SERVICE_SUBGRAPH__OPTIMISM'",
"deploy:polygon": "yarn prepare:polygon && bash -c 'source .env || true && graph deploy --node https://api.thegraph.com/deploy/ $HOSTED_SERVICE_SUBGRAPH__POLYGON'",
"prepare:rinkeby": "mustache network_configs/rinkeby.json subgraph.template.yaml > subgraph.yaml",
"prepare:avalanche": "mustache network_configs/avalanche.json subgraph.template.yaml > subgraph.yaml",
"prepare:bsc": "mustache network_configs/bsc.json subgraph.template.yaml > subgraph.yaml",
Expand Down

0 comments on commit 1cc8bc6

Please sign in to comment.