-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (47 loc) · 1.7 KB
/
deploy-contract.yml
File metadata and controls
50 lines (47 loc) · 1.7 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
44
45
46
47
48
49
50
# why: Deploys the AuthiChainNFT ERC-721 contract that anchors every QRON identity and TrueMark™ seal on-chain — this workflow is how new networks (Polygon, VeChain, testnets) are brought into production.
# value: Every authenticated scan on AuthiChain ultimately resolves to a token minted by this contract, so reliable, reproducible, multi-chain deployment is the backbone of the entire authentication business.
name: Deploy AuthiChainNFT Contract
on:
workflow_dispatch:
inputs:
network:
description: "Target network"
required: true
default: "polygon_amoy"
type: choice
options:
- polygon_amoy
- polygon
- vechain_test
- vechain_main
grant_minter:
description: "Grant minter role to MINTER_ADDRESS after deploy?"
required: true
default: "true"
permissions:
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm install --legacy-peer-deps
- name: Compile contracts
run: npx hardhat compile
- name: Deploy contract
env:
DEPLOYER_PRIVATE_KEY: ${{ secrets.DEPLOYER_PRIVATE_KEY }}
MINTER_ADDRESS: ${{ secrets.MINTER_ADDRESS }}
run: |
NETWORK="${{ github.event.inputs.network }}"
echo "Deploying to network: $NETWORK"
npx hardhat run scripts/nft/deploy.ts --network $NETWORK
- name: Summary
run: echo "Deployment complete. Check logs above for contract address."