Skip to content

CI and Deploy to PulseChain Testnet #13

CI and Deploy to PulseChain Testnet

CI and Deploy to PulseChain Testnet #13

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: |
mkdir -p dist
forge create src/MultiSigEnterpriseVault.sol:MultiSigEnterpriseVault \
--chain pulsechain-testnet \
--rpc-url $PULSECHAIN_TESTNET_RPC_URL \
--constructor-args $OWNER_ADDRESS $INITIAL_THRESHOLD $INITIAL_MULTISIG_TIMELOCK $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 ABI
run: |
forge inspect src/MultiSigEnterpriseVault.sol:MultiSigEnterpriseVault abi > dist/deployment_abi.json
- name: Upload Deployment Artifact
uses: actions/upload-artifact@v4
with:
name: MultiSigEnterpriseVault
path: dist/