-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (56 loc) · 2.06 KB
/
deploy-factory-and-registry.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
name: "Deploy: Factory and Registry"
env:
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }}
MNEMONIC: ${{ secrets.MNEMONIC }}
on:
workflow_dispatch:
inputs:
chain:
description: "Chain name in lowercase"
required: true
confirmations:
default: "2"
description: "Number of block confirmations to wait before attempting verification"
required: false
jobs:
deploy-and-verify:
runs-on: "ubuntu-latest"
steps:
- name: "Check out the repo"
uses: "actions/checkout@v2"
with:
ref: ${{ github.event.inputs.ref }}
- name: "Setup Node.js"
uses: "actions/setup-node@v2"
with:
cache: "yarn"
node-version: "16"
- name: "Install the dependencies"
run: "yarn install --immutable"
- name: "Compile the contracts and generate TypeChain bindings"
run: "yarn compile"
- name: "Deploy PRBProxyFactory"
id: "deploy-factory"
run: >-
yarn hardhat --network "${{ github.event.inputs.chain }}"
deploy:contract:prb-proxy-factory
--confirmations "${{ github.event.inputs.confirmations }}"
--set-output true
- name: "Verify PRBProxyFactory"
run: >-
yarn hardhat --network "${{ github.event.inputs.chain }}"
verify "${{ steps.deploy-factory.outputs.prb-proxy-factory }}"
- name: "Deploy PRBProxyRegistry"
id: "deploy-registry"
run: >-
yarn hardhat --network "${{ github.event.inputs.chain }}"
deploy:contract:prb-proxy-registry
--factory "${{ steps.deploy-factory.outputs.prb-proxy-factory }}"
--confirmations "${{ github.event.inputs.confirmations }}"
--set-output true
- name: "Verify PRBProxyRegistry"
run: >-
yarn hardhat --network "${{ github.event.inputs.chain }}"
verify "${{ steps.deploy-registry.outputs.prb-proxy-registry }}"
"${{ steps.deploy-factory.outputs.prb-proxy-factory }}"