Include environment variables only per specific branch

Hey guys. I’ve been using Travis and so far it feels okay. It has it’s downsides but overall strong CI/CD platform.
What I’d like to ask is if it’s possible to include set of encrypted environmental variables only when i’m pushing to master? This is the specific scenario that I have, I would not like them to be set if any other branch is pushed.
So far I’ve only found that I’d have to set 2/3 different travis.yml files on different branches.
Any other method I could use here?