What is the preferred way of setting environment variables between develop and production environments

Is there a way to define blocks of environment variables that can be reused in multiple workflows? It would be nice to set one set of variables that are “develop” and one set that are “production” and then use these depending on the workflow.

E.G.

_develop_setup:
    envs:
      - CI: true
      - CODEPUSH_TARGET_DEPLOYMENT: "develop"
      - CODEPUSH_DEPLOYMENT_KEY_ANDROID: $CODEPUSH_DEPLOYMENT_KEY_ANDROID_DEVELOP
      - CODEPUSH_DEPLOYMENT_KEY_IOS: $CODEPUSH_DEPLOYMENT_KEY_IOS_DEVELOP

  _production_setup:
    envs:
      - CODEPUSH_DEPLOYMENT_KEY_ANDROID: $CODEPUSH_DEPLOYMENT_KEY_ANDROID_PRODUCTION
      - CODEPUSH_DEPLOYMENT_KEY_IOS: $CODEPUSH_DEPLOYMENT_KEY_IOS_PRODUCTION
      - CI: true
      - CODEPUSH_TARGET_DEPLOYMENT: "production
1 Like