update sg workflow #416
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@v4 | |
- uses: DeterminateSystems/magic-nix-cache-action@v2 | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- name: Report public key to make it easy to send funds for deployments | |
run: cast wallet address "${DEPLOYMENT_KEY}" | |
- name: Forge shallow install | |
run: forge install --shallow | |
- 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 |