Environment variable for multiple deploys

I can set Environment Variable in Netlify UI for Production. I want to do the same for develop branch (e.g. Branch deploys). Netlify triggers build automatically from a git repository. I don’t want to manually deploy to Netlify.

Searching around makes me believe that I have to do it in netlify.toml . However, I don’t want to commit my environment variable in netlify.toml. Environment variables are secret and they should be treated so.

Environment variables in the UI are available to all deploys published after adding those variables, regardless of the branch or context.

well, that is a bad thing , isn’t it? Production and staging may use different environment variable such as different API endpoint, different Recaptcha Key, etc …

Did you give this a read: