diff --git a/.github/workflows/manual-sol-artifacts.yaml b/.github/workflows/manual-sol-artifacts.yaml index f2f4726f9..1c8a50622 100644 --- a/.github/workflows/manual-sol-artifacts.yaml +++ b/.github/workflows/manual-sol-artifacts.yaml @@ -7,9 +7,15 @@ on: required: true type: choice options: + - arbitrum + - avalanche + - base + - bsc + - ethereum + - flare + - mumbai - polygon - songbird - - flare jobs: deploy: @@ -17,6 +23,11 @@ jobs: 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 @@ -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' || '' }}