-
Notifications
You must be signed in to change notification settings - Fork 5
33 lines (32 loc) · 1.52 KB
/
ci-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
name: CI deployments
on: [push]
jobs:
deploy:
runs-on: ubuntu-latest
env:
DEPLOYMENT_KEY: ${{ github.ref == 'refs/heads/main' && secrets.PRIVATE_KEY || secrets.PRIVATE_KEY_DEV }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v4
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Install rain
run: nix profile install github:rainprotocol/rain.cli
- run: rain --version
- name: Report public key to make it easy to send funds for deployments
run: cast wallet address "${DEPLOYMENT_KEY}"
- name: Forge deploy contracts to mumbai
env:
CI_DEPLOY_RPC_URL: ${{ secrets.CI_DEPLOY_RPC_URL }}
EXPLORER_VERIFICATION_KEY: ${{ secrets.EXPLORER_VERIFICATION_KEY }}
run: nix run .#deploy-contracts
# - name: Forge deploy contract to mumbai
# env:
# CI_DEPLOY_RPC_URL: ${{ secrets.CI_DEPLOY_RPC_URL }}
# EXPLORER_VERIFICATION_KEY: ${{ secrets.EXPLORER_VERIFICATION_KEY }}
# run: forge build && forge script script/DeployCloneFactory.sol:DeployCloneFactory --legacy --verify --broadcast --rpc-url "${CI_DEPLOY_RPC_URL}" --etherscan-api-key "${EXPLORER_VERIFICATION_KEY}" --sig='run(bytes)' $(rain meta build -i <(rain meta solc artifact -c abi -i out/CloneFactory.sol/CloneFactory.json) -m solidity-abi-v2 -t json -e deflate -l en -E hex)