-
Notifications
You must be signed in to change notification settings - Fork 39
69 lines (62 loc) · 2.14 KB
/
deploy.yml
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
name: Deployment
on:
workflow_dispatch:
inputs:
network:
description: The EVM compatible network.
default: goerli
required: true
verification:
description: Whether to verify contracts or not.
default: "false"
required: true
verifyContract:
description: Contracts to be verified on etherscan (separated by comma).
default: "*Logic,Pool*,*Oracle,*Gateway*,*DataProvider,ACLManager,Seaport"
required: true
jobs:
deployment:
name: Deployment
runs-on: ubuntu-latest
strategy:
matrix:
node: [18]
env:
INFURA_KEY: ${{ secrets.INFURA_KEY }}
DEPLOYER_MNEMONIC: ${{ secrets.DEPLOYER_MNEMONIC }}
ETHERSCAN_KEY: ${{ secrets.ETHERSCAN_KEY }}
NETWORK: ${{ github.event.inputs.network }}
ETHERSCAN_VERIFICATION: ${{ github.event.inputs.verification }}
ETHERSCAN_VERIFICATION_CONTRACTS: ${{ github.event.inputs.verifyContract }}
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
token: ${{ secrets.PAT }}
submodules: true
- name: Setup nodejs
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
registry-url: https://registry.npmjs.org
- name: Install dependencies
run: |
yarn cache clean --all
YARN_CHECKSUM_BEHAVIOR=update yarn
yarn
yarn build
- name: Deploy
run: |
echo NETWORK=${{ env.NETWORK }} >> .env
echo INFURA_KEY=${{ env.INFURA_KEY }} >> .env
echo DEPLOYER_MNEMONIC=${{ env.DEPLOYER_MNEMONIC }} >> .env
echo ETHERSCAN_KEY=${{ env.ETHERSCAN_KEY }} >> .env
echo ETHERSCAN_VERIFICATION=${{ env.ETHERSCAN_VERIFICATION }} >> .env
echo ETHERSCAN_VERIFICATION_CONTRACTS=${{ env.ETHERSCAN_VERIFICATION_CONTRACTS }} >> .env
make deploy
- name: Upload Artifacts
if: always()
uses: actions/upload-artifact@master
with:
name: ${{ github.event.inputs.network }}-deployed-contracts-${{ github.sha }}
path: deployed-contracts.json