Skip to content

Commit

Permalink
Merge branch 'main' into 2024-02-29-new-yaml-structure
Browse files Browse the repository at this point in the history
  • Loading branch information
mattyg committed Mar 15, 2024
2 parents 791cb41 + 778bccf commit f15a630
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions .github/workflows/manual-sol-artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,27 @@ on:
required: true
type: choice
options:
- arbitrum
- avalanche
- base
- bsc
- ethereum
- flare
- mumbai
- polygon
- songbird
- flare

jobs:
deploy:
runs-on: ubuntu-latest
env:
DEPLOYMENT_KEY: ${{ github.ref == 'refs/heads/main' && secrets.PRIVATE_KEY || secrets.PRIVATE_KEY_DEV }}
steps:
- run: |
network=${{ inputs.network }}
echo "etherscan_api_key_secret_name=CI_DEPLOY_${network^^}_ETHERSCAN_API_KEY" >> $GITHUB_ENV
echo "rpc_secret_name=CI_DEPLOY_${network^^}_RPC_URL" >> $GITHUB_ENV
- uses: actions/checkout@v4
with:
submodules: recursive
Expand All @@ -27,10 +38,10 @@ jobs:

- run: nix develop --command rainix-sol-prelude
- run: nix develop --command rainix-rs-prelude
- run: nix develop --command rainix-sol-artifacts
- name: deploy to ${{ inputs.network }}
run: nix develop --command rainix-sol-artifacts
env:
ETH_RPC_URL: ${{ inputs.network == 'polygon' && secrets.CI_DEPLOY_POLYGON_RPC_URL || inputs.network == 'songbird' && secrets.CI_DEPLOY_SONGBIRD_RPC_URL || inputs.network == 'flare' && secrets.CI_DEPLOY_FLARE_RPC_URL || '' }}
# Flare has hardcoded api key https://flarescan.com/documentation/recipes/foundry-verification
ETHERSCAN_API_KEY: ${{ inputs.network == 'flare' && 'verifyContract' || secrets.EXPLORER_VERIFICATION_KEY }}
DEPLOY_VERIFIER: ${{ inputs.network == 'songbird' && 'blockscout' || inputs.network == 'polygon' && 'etherscan' || '' }}
ETH_RPC_URL: ${{ secrets[env.rpc_secret_name] || '' }}
ETHERSCAN_API_KEY: ${{ secrets[env.etherscan_api_key_secret_name] || ''}}
DEPLOY_VERIFIER: ${{ inputs.network == 'flare' && 'sourcify' || inputs.network == 'songbird' && 'blockscout' || 'etherscan' }}
DEPLOY_VERIFIER_URL: ${{ inputs.network == 'songbird' && 'https://songbird-explorer.flare.network/api' || inputs.network == 'flare' && 'https://api.routescan.io/v2/network/mainnet/evm/14/etherscan' || '' }}

0 comments on commit f15a630

Please sign in to comment.