How can I set environment variables from a .env file?

I want store all the environment variables in the .env file.
How can I configure Travis CI to read them and use in the build?