-
Notifications
You must be signed in to change notification settings - Fork 7
147 lines (128 loc) · 5.33 KB
/
prod-release-deploy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
name: Prod Release Deployment
on:
release:
types: published
env:
REACT_APP_POSTER_CONTRACT: ${{ secrets.REACT_APP_POSTER_CONTRACT }}
REACT_APP_INFURA_NETWORK_ACCESS_KEY: ${{ secrets.REACT_APP_INFURA_NETWORK_ACCESS_KEY }}
REACT_APP_INFURA_IPFS_API_KEY: ${{ secrets.REACT_APP_INFURA_IPFS_API_KEY }}
REACT_APP_INFURA_IPFS_API_SECRET: ${{ secrets.REACT_APP_INFURA_IPFS_API_SECRET }}
REACT_APP_SUBGRAPH_BASE_URL: https://api.thegraph.com/subgraphs/name/
REACT_APP_SUBGRAPH_GNOSIS_CHAIN: auryn-macmillan/tabula-gnosis-chain
REACT_APP_SUBGRAPH_MAINNET: auryn-macmillan/tabula-mainnet
REACT_APP_SUBGRAPH_GOERLI: auryn-macmillan/tabula-goerli
REACT_APP_SUBGRAPH_SEPOLIA: auryn-macmillan/tabula-sepolia
REACT_APP_SUBGRAPH_POLYGON: auryn-macmillan/tabula-polygon
REACT_APP_SUBGRAPH_ARBITRUM: auryn-macmillan/tabula-arbitrum
REACT_APP_SUBGRAPH_OPTIMISM: auryn-macmillan/tabula-optimism
REACT_APP_SUBGRAPH_OPTIMISM_ON_GNOSIS_CHAIN: auryn-macmillan/tabula-optimism-on-gnosis-chain
REACT_APP_IPFS_GATEWAY: https://ipfs.io/ipfs
REACT_APP_ENS_SUBGRAPH_MAINNET: ensdomains/ens
REACT_APP_ENS_SUBGRAPH_GOERLI: ensdomains/ensgoerli
jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy to Prod
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16
- run: npm install -g yarn
- run: yarn install --frozen-lockfile
- run: yarn build
- name: Pin to IPFS
id: upload
uses: anantaramdas/ipfs-pinata-deploy-action@39bbda1ce1fe24c69c6f57861b8038278d53688d
with:
pin-name: Tabula - Release — ${ GITHUB_SHA }
path: "./packages/app/build"
pinata-api-key: ${{ secrets.PINATA_API_KEY }}
pinata-secret-api-key: ${{ secrets.PINATA_API_SECRET_KEY }}
- name: Pin to Crust
uses: crustio/[email protected]
continue-on-error: true
timeout-minutes: 2
with:
cid: ${{ steps.upload.outputs.hash }}
seeds: ${{ secrets.CRUST_SEEDS }}
- name: Convert CIDv0 to CIDv1
id: convert_cidv0
uses: uniswap/[email protected]
with:
cidv0: ${{ steps.upload.outputs.hash }}
- name: Update DNS with new IPFS hash
env:
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
RECORD_DOMAIN: "tabula.gg"
RECORD_NAME: "_dnslink"
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
uses: textileio/cloudflare-update-dnslink@0fe7b7a1ffc865db3a4da9773f0f987447ad5848
with:
cid: ${{ steps.upload.outputs.hash }}
- name: update release
id: update_release
uses: tubone24/[email protected]
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: Authenticate graph cli studio
# working-directory: packages/subgraph
# run: yarn run graph auth --studio ${{ secrets.SUBGRAPH_DEPLOYMENT_KEY }}
# - name: Deploy subgraph to Mainnet on Studio
# working-directory: packages/subgraph
# env:
# SUBGRAPH__MAINNET: tabula-mainnet
# run: yarn deploy:mainnet
- name: Authenticate graph cli hosted service
working-directory: packages/subgraph
run: yarn run graph auth --product hosted-service ${{ secrets.GRAPH_ACCESS_TOKEN }}
- name: Deploy subgraph to mainnet
working-directory: packages/subgraph
env:
HOSTED_SERVICE_SUBGRAPH__MAINNET: auryn-macmillan/tabula-mainnet
run: yarn deploy:mainnet
- name: Deploy subgraph to Gnosis Chain
working-directory: packages/subgraph
env:
HOSTED_SERVICE_SUBGRAPH__GNOSIS_CHAIN: auryn-macmillan/tabula-gnosis-chain
run: yarn deploy:gnosis-chain
- name: Deploy subgraph to Goerli
working-directory: packages/subgraph
env:
HOSTED_SERVICE_SUBGRAPH__GOERLI: auryn-macmillan/tabula-goerli
run: yarn deploy:goerli
- name: Deploy subgraph to Sepolia
working-directory: packages/subgraph
env:
HOSTED_SERVICE_SUBGRAPH__GOERLI: auryn-macmillan/tabula-sepolia
run: yarn deploy:sepolia
- name: Deploy subgraph to Polygon
working-directory: packages/subgraph
env:
HOSTED_SERVICE_SUBGRAPH__POLYGON: auryn-macmillan/tabula-polygon
run: yarn deploy:polygon
- name: Deploy subgraph to Arbitrum
working-directory: packages/subgraph
env:
HOSTED_SERVICE_SUBGRAPH__ARBITRUM: auryn-macmillan/tabula-arbitrum
run: yarn deploy:arbitrum
- name: Deploy subgraph to Optimism
working-directory: packages/subgraph
env:
HOSTED_SERVICE_SUBGRAPH__OPTIMISM: auryn-macmillan/tabula-optimism
run: yarn deploy:optimism
- name: Deploy to Github Pages
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: ./packages/app/build