-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (40 loc) · 1.2 KB
/
deploy.yml
File metadata and controls
43 lines (40 loc) · 1.2 KB
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
name: Deploy contracts
on:
workflow_dispatch:
inputs:
DEPLOY_NETWORK:
description: Deploy network
required: true
type: choice
options:
- mumbai_dev
- matic_prod
TOKEN_NAME:
description: Contract name
required: true
default: Test NFT
TOKEN_SYMBOL:
description: Contract symbol
required: true
default: TNFT
env:
POLYGONSCAN_KEY: ${{secrets.POLYGONSCAN_KEY}}
PRIVATE_KEY_DEV: ${{secrets.PRIVATE_KEY_DEV}}
PRIVATE_KEY_PROD: ${{secrets.PRIVATE_KEY_PROD}}
ALCHEMY_PROD_URL: ${{secrets.ALCHEMY_PROD_URL}}
ALCHEMY_DEV_URL: ${{secrets.ALCHEMY_DEV_URL}}
jobs:
deploy:
# if: contains('[ $repo_owner , "username1", "username2"...]', github.actor)
if: contains('[ ${{github.repository_owner}} ]', github.actor)
runs-on: ubuntu-latest
env:
TOKEN_NAME: ${{ github.event.inputs.TOKEN_NAME }}
TOKEN_SYMBOL: ${{ github.event.inputs.TOKEN_SYMBOL }}
steps:
- uses: actions/checkout@v2
- uses: borales/actions-yarn@v2.3.0
with:
cmd: install
- run: npx hardhat compile
- run: npx hardhat deploy --network ${{ github.event.inputs.DEPLOY_NETWORK }}