Hi,
I’m trying to set different values for environment variables on CircleCI according to the current $CIRCLE_BRANCH. I tried setting two different values on CircleCI settings and exporting them accordingly on the deployment phase, but that doesn’t work:
deployment:
release:
branch: master
commands:
...
- export API_URL=$RELEASE_API_URL; npm run build
...
staging:
branch: develop
commands:
...
- export API_URL=$STAGING_API_URL; npm run build
...
How could I achieve that?
Thanks in advance.