faberNovel / ad_localize

ADLocalize is a simple way to manage your localization files. Supported wording sources : CSVs and Google Sheets. Localization file generation available for iOS, Android, JSON (i18next), YAML and Java properties
https://rubygems.org/gems/ad_localize
MIT License
24 stars 8 forks source link

Use a gcloud service account to access private spreadsheet #31

Closed sjcqs closed 4 years ago

sjcqs commented 4 years ago

Related issue: #27

Making a spreadsheet public in order to be able to download it from adlocalize, might not be ideal.

Instead, we could use a GCloud service provider which would be invited to the spreadsheet to export.

To use a service account:

  1. Create a project on GCloud
  2. Enable Google Drive API for this project to be able to grant drive.readonly scope (to download spreadsheets)
  3. Create a service account there and store the provided client_secret.json file securely (password manager for ex.).
  4. To use adlocalize, export the client_secret.json as an environment variable. (this could be done using Jenkins credentials, Githubs secret, etc)

This won't be a good solution for manual exports as this would require users to get the client_secret.json and setting it as environment variable,