Skip to content

Commit

Permalink
#58 way to get mapbox_public_token and google_api_key from repo secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
anton6tak committed Jul 14, 2021
1 parent 4955e00 commit 0d5d546
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_KEY: ${{ secrets.GPG_KEY_CONTENTS }}
MAPBOX_SECRET_TOKEN: ${{ secrets.MAPBOX_SECRET_TOKEN }}
MAPBOX_PUBLIC_TOKEN: ${{ secrets.MAPBOX_PUBLIC_TOKEN }}
GOOGLE_MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY }}
steps:
- uses: actions/checkout@v1
Expand Down
4 changes: 2 additions & 2 deletions sample/android-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ android {

multiDexEnabled = true

val googleMapsApiKey: String = (extra["googleMaps.apiKey"] as? String).orEmpty()
val mapboxPublicToken: String = (extra["mapbox.publicToken"] as? String).orEmpty()
val googleMapsApiKey: String = (System.getenv("GOOGLE_MAPS_API_KEY") ?: extra["googleMaps.apiKey"] as? String).orEmpty()
val mapboxPublicToken: String = (System.getenv("MAPBOX_PUBLIC_TOKEN") ?: extra["mapbox.publicToken"] as? String).orEmpty()

manifestPlaceholders["googleMapsApiKey"] = googleMapsApiKey
buildConfigField("String", "GOOGLE_MAPS_API_KEY", "\"$googleMapsApiKey\"")
Expand Down

0 comments on commit 0d5d546

Please sign in to comment.