How to use secrets in local env files (react native)

Hi. I want to use a secret variable in bitrise workflow. However currently I have 3 different env files (stage, preprod, prod) and they are committed to git so bitrise was reading from these files. I am using react-native config. Should I completely remove the env files from git and use bitrise env vars? If so, how can I have 3 different cases depending on the environment. Or can I combine strings with bitrise variables? How can I make this work?

P.S. In our case bitrise.yml is stored on bitrise not app repo.


Hi there @elinahov :wave:

Have you checked our guides on Secrets? You can find them here:

I think the best would be to use different workflows for different environments, and have those workflows include the Secrets you need. Secrets work the same way regardless of what type of project you have. :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.