File tree Expand file tree Collapse file tree 1 file changed +12
-19
lines changed
Expand file tree Collapse file tree 1 file changed +12
-19
lines changed Original file line number Diff line number Diff line change @@ -62,25 +62,18 @@ jobs:
6262 NETWORK="${{ inputs.network }}"
6363 ENVIRONMENT="${{ inputs.environment }}"
6464
65- # Define mainnet networks
66- MAINNET_NETWORKS=("arbitrum" "bellecour")
67-
68- IS_MAINNET=false
69- for mainnet in "${MAINNET_NETWORKS[@]}"; do
70- if [ "$NETWORK" = "$mainnet" ]; then
71- IS_MAINNET=true
72- break
73- fi
74- done
75-
76- # For mainnet networks, check that environment is not dev
77- if [ "$IS_MAINNET" = true ] && [ "$ENVIRONMENT" = "dev" ]; then
78- echo "Error: Cannot deploy to mainnet ($NETWORK) with dev environment"
79- exit 1
80- fi
81-
82- # Export variables for subsequent steps
83- echo "IS_MAINNET=$IS_MAINNET" >> $GITHUB_ENV
65+ case "$NETWORK" in
66+ arbitrum|bellecour)
67+ if [ "$ENVIRONMENT" = "dev" ]; then
68+ echo "Error: Cannot deploy to mainnet ($NETWORK) with dev environment"
69+ exit 1
70+ fi
71+ echo "IS_MAINNET=true" >> $GITHUB_ENV
72+ ;;
73+ *)
74+ echo "IS_MAINNET=false" >> $GITHUB_ENV
75+ ;;
76+ esac
8477
8578 - name : Deploy contract
8679 working-directory : packages/smart-contract
You can’t perform that action at this time.
0 commit comments