DEV Community

Cover image for Use GitHub secrets in your Android App
Sumanth Perambuduri
Sumanth Perambuduri

Posted on • Updated on

Use GitHub secrets in your Android App

Alright I am gonna get straight to the point.

  • Add 'app/src/main/res/values/secrets.xml' and 'app/src/main/res/values/secrets.xml~' in '.gitignore' file.
  • Create 'secrets.xml' file in 'app/src/main/res/values' path.
  • Add the following code in 'secrets.xml' :
  • Add the following code to your 'activity.kt' file:
  • Add the following code under steps in your workflow file rite before build step:
  • Finally, add the secret to your GitHub repository with key “API_KEY”.
  • That’s it. You are good to go.

Here's the example project:
Spotify Playlist Downloader

Top comments (0)