Skip to content

ci: pulsechain testnet deployment #3

ci: pulsechain testnet deployment

ci: pulsechain testnet deployment #3

Workflow file for this run

name: CI and Deploy to PulseChain Testnet
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
env:
FOUNDRY_PROFILE: ci
jobs:
setup:
name: Setup Foundry
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Show Forge version
run: |
forge --version
- name: Run Forge fmt
run: |
forge fmt --check
id: forge-fmt
- name: Run Forge build
run: |
forge build --sizes
id: forge-build
- name: Run Forge tests
run: |
forge test -vvv
id: forge-test
deploy:
name: Deploy to PulseChain Testnet
runs-on: ubuntu-latest
needs: setup
environment: pulsechain-testnet
if: github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Deploy MultiSigEnterpriseVault Contract
run: |
forge create src/MultiSigEnterpriseVault.sol:MultiSigEnterpriseVault \
--chain pulsechain-testnet \
--rpc-url ${{ env.PULSECHAIN_TESTNET_RPC_URL }} \
--constructor-args ${{ env.OWNER_ADDRESS }} ${{ env.INITIAL_THRESHOLD }} ${{ env.INITIAL_MULTISIG_TIMELOCK }} ${{ env.INITIAL_OWNEROVEREIDE_TIMELOCK }} \
--private-key ${{ secrets.PRIVATE_KEY }} --verify --verifier blockscout --verifier-url https://api.scan.v4.testnet.pulsechain.com/api/ | tee dist/deployment_result.txt
- name: Save deployment artifacts
run: |
cp out/MultiSigEnterpriseVault.sol/MultiSigEnterpriseVault.json dist/deployment_output.json
- name: Upload deployment artifact
uses: actions/upload-artifact@v2
with:
name: MultiSigEnterpriseVault
path: dist/