[#784] Refactor support email address to CI variable
--------- Co-authored-by: Honza <rychnovsky.honza@gmail.com>
This commit is contained in:
parent
5e3c1f1768
commit
5fc3974129
|
@ -9,6 +9,9 @@
|
|||
# FIREBASE_DEBUG_JSON_BASE64 - Optional JSON to enable Firebase (e.g. Crashlytics) for debug builds
|
||||
# FIREBASE_RELEASE_JSON_BASE64 - Optional JSON to enable Firebase (e.g. Crashlytics) for release builds
|
||||
|
||||
# Expected variables
|
||||
# SUPPORT_EMAIL_ADDRESS - Contact email address for sending requests from the app
|
||||
|
||||
name: Deploy
|
||||
|
||||
on:
|
||||
|
@ -113,6 +116,7 @@ jobs:
|
|||
- name: Upload to Play Store
|
||||
timeout-minutes: 25
|
||||
env:
|
||||
ORG_GRADLE_PROJECT_ZCASH_SUPPORT_EMAIL_ADDRESS: ${{ vars.SUPPORT_EMAIL_ADDRESS }}
|
||||
ORG_GRADLE_PROJECT_ZCASH_GOOGLE_PLAY_SERVICE_KEY_FILE_PATH: ${{ steps.auth_google_play.outputs.credentials_file_path }}
|
||||
ORG_GRADLE_PROJECT_ZCASH_RELEASE_KEYSTORE_PATH: ${{ format('{0}/release.jks', env.home) }}
|
||||
ORG_GRADLE_PROJECT_ZCASH_RELEASE_KEYSTORE_PASSWORD: ${{ secrets.UPLOAD_KEYSTORE_PASSWORD }}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
# Expected variables
|
||||
# FIREBASE_TEST_LAB_PROJECT - Firebase Test Lab project name
|
||||
# SUPPORT_EMAIL_ADDRESS - Contact email address for sending requests from the app
|
||||
|
||||
name: Pull Request
|
||||
|
||||
|
@ -286,6 +287,7 @@ jobs:
|
|||
- name: Test
|
||||
timeout-minutes: 30
|
||||
env:
|
||||
ORG_GRADLE_PROJECT_ZCASH_SUPPORT_EMAIL_ADDRESS: ${{ vars.SUPPORT_EMAIL_ADDRESS }}
|
||||
# Force blank suffix for screenshot tests
|
||||
ORG_GRADLE_PROJECT_ZCASH_DEBUG_APP_NAME_SUFFIX: ""
|
||||
# Used by Flank, since the temporary token is missing the project name
|
||||
|
@ -335,6 +337,7 @@ jobs:
|
|||
- name: Build and test
|
||||
timeout-minutes: 30
|
||||
env:
|
||||
ORG_GRADLE_PROJECT_ZCASH_SUPPORT_EMAIL_ADDRESS: ${{ vars.SUPPORT_EMAIL_ADDRESS }}
|
||||
# Force blank suffix for screenshot tests
|
||||
ORG_GRADLE_PROJECT_ZCASH_DEBUG_APP_NAME_SUFFIX: ""
|
||||
ORG_GRADLE_PROJECT_ZCASH_EMULATOR_WTF_API_KEY: ${{ secrets.EMULATOR_WTF_API_KEY }}
|
||||
|
@ -382,6 +385,7 @@ jobs:
|
|||
- name: Build and test
|
||||
timeout-minutes: 30
|
||||
env:
|
||||
ORG_GRADLE_PROJECT_ZCASH_SUPPORT_EMAIL_ADDRESS: ${{ vars.SUPPORT_EMAIL_ADDRESS }}
|
||||
# Force blank suffix for screenshot tests
|
||||
ORG_GRADLE_PROJECT_ZCASH_DEBUG_APP_NAME_SUFFIX: ""
|
||||
ORG_GRADLE_PROJECT_ZCASH_EMULATOR_WTF_API_KEY: ${{ secrets.EMULATOR_WTF_API_KEY }}
|
||||
|
@ -441,6 +445,7 @@ jobs:
|
|||
- name: Build
|
||||
timeout-minutes: 20
|
||||
env:
|
||||
ORG_GRADLE_PROJECT_ZCASH_SUPPORT_EMAIL_ADDRESS: ${{ vars.SUPPORT_EMAIL_ADDRESS }}
|
||||
ORG_GRADLE_PROJECT_IS_CRASH_ON_STRICT_MODE_VIOLATION: true
|
||||
run: |
|
||||
./gradlew :app:assembleDebug
|
||||
|
@ -505,6 +510,7 @@ jobs:
|
|||
- name: Build
|
||||
timeout-minutes: 20
|
||||
env:
|
||||
ORG_GRADLE_PROJECT_ZCASH_SUPPORT_EMAIL_ADDRESS: ${{ vars.SUPPORT_EMAIL_ADDRESS }}
|
||||
ORG_GRADLE_PROJECT_ZCASH_RELEASE_KEYSTORE_PATH: ${{ format('{0}/release.jks', env.home) }}
|
||||
ORG_GRADLE_PROJECT_ZCASH_RELEASE_KEYSTORE_PASSWORD: android
|
||||
ORG_GRADLE_PROJECT_ZCASH_RELEASE_KEY_ALIAS: androiddebugkey
|
||||
|
|
16
README.md
16
README.md
|
@ -23,17 +23,17 @@ Contributions are very much welcomed! Please read our [Contributing Guidelines]
|
|||
# Forking
|
||||
If you plan to fork the project to create a new app of your own, please make the following changes. (If you're making a GitHub fork to contribute back to the project, these steps are not necessary.)
|
||||
|
||||
1. Change the app name and package name under [gradle.properties](gradle.properties)
|
||||
1. ZCASH_RELEASE_APP_NAME
|
||||
1. ZCASH_RELEASE_PACKAGE_NAME
|
||||
1. Change the support email address under ui-lib/src/res/ui/support/values/strings.xml
|
||||
1. Change the app name under [gradle.properties](gradle.properties)
|
||||
1. See `ZCASH_RELEASE_APP_NAME`
|
||||
1. Change the package name under [app/build.gradle.kts](app/build.gradle.kts)
|
||||
1. See `ZCASH_RELEASE_PACKAGE_NAME`
|
||||
1. Change the support email address under [gradle.properties](gradle.properties)
|
||||
1. See `ZCASH_SUPPORT_EMAIL_ADDRESS`
|
||||
1. Remove any copyrighted ZCash or Electric Coin Company icons, logos, or assets
|
||||
1. ui-lib/src/main/res/common/ - All of the the ic_launcher assets
|
||||
1. Change the package name
|
||||
1. Under [app/build.gradle.kts](app/build.gradle.kts), change the package name of the application
|
||||
1. Optional
|
||||
1. Configure secrets for [Continuous Integration](docs/CI.md).
|
||||
1. Configure Firebase API keys and placing them under `app/src/debug/google-services.json` and `app/src/release/google-services.json`
|
||||
1. Configure secrets and variables for [Continuous Integration](docs/CI.md)
|
||||
1. Configure Firebase API keys and place them under `app/src/debug/google-services.json` and `app/src/release/google-services.json`
|
||||
|
||||
# Known Issues
|
||||
1. Intel-based machines may have trouble building in Android Studio. The workaround is to add the following line to `~/.gradle/gradle.properties` `ZCASH_IS_DEPENDENCY_LOCKING_ENABLED=false`. See [#420](https://github.com/zcash/secant-android-wallet/issues/420) for more information.
|
||||
|
|
|
@ -140,6 +140,7 @@ android {
|
|||
applicationVariants.all {
|
||||
val defaultAppName = project.property("ZCASH_RELEASE_APP_NAME").toString()
|
||||
val debugAppNameSuffix = project.property("ZCASH_DEBUG_APP_NAME_SUFFIX").toString()
|
||||
val supportEmailAddress = project.property("ZCASH_SUPPORT_EMAIL_ADDRESS").toString()
|
||||
when (this.name) {
|
||||
"zcashtestnetDebug" -> {
|
||||
resValue("string", "app_name", "$defaultAppName ($testnetNetworkName)$debugAppNameSuffix")
|
||||
|
@ -154,6 +155,7 @@ android {
|
|||
resValue("string", "app_name", defaultAppName)
|
||||
}
|
||||
}
|
||||
resValue("string", "support_email_address", supportEmailAddress)
|
||||
}
|
||||
|
||||
playConfigs {
|
||||
|
|
|
@ -100,6 +100,7 @@ tasks {
|
|||
|
||||
"ZCASH_RELEASE_APP_NAME" to "sECCant",
|
||||
"ZCASH_RELEASE_PACKAGE_NAME" to "co.electriccoin.zcash",
|
||||
"ZCASH_SUPPORT_EMAIL_ADDRESS" to "",
|
||||
|
||||
"ZCASH_DEBUG_KEYSTORE_PATH" to "",
|
||||
"ZCASH_RELEASE_KEYSTORE_PATH" to "",
|
||||
|
|
|
@ -14,6 +14,7 @@ To enhance security, [OpenID Connect](https://docs.github.com/en/actions/deploym
|
|||
|
||||
### Pull request
|
||||
* Variables
|
||||
* `ZCASH_SUPPORT_EMAIL_ADDRESS` - Email address for user support requests.
|
||||
* `FIREBASE_TEST_LAB_PROJECT` - Firebase Test Lab project name.
|
||||
* Secrets
|
||||
* `EMULATOR_WTF_API_KEY` - API key for [Emulator.wtf](https://emulator.wtf)
|
||||
|
@ -35,6 +36,8 @@ Note that pull requests will create a "release" build with a temporary fake sign
|
|||
Note that `FIREBASE_DEBUG_JSON_BASE64` and `FIREBASE_RELEASE_JSON_BASE64` are not truly considered secret, as they contain API keys that are embedded in the application. However we are not including them in the repository to reduce accidental pollution of our crash report data from repository forks.
|
||||
|
||||
### Release deployment
|
||||
* Variables
|
||||
* `ZCASH_SUPPORT_EMAIL_ADDRESS` - Email address for user support requests.
|
||||
* Secrets
|
||||
* `GOOGLE_PLAY_CLOUD_PROJECT` - Google Cloud project associated with Google Play.
|
||||
* `GOOGLE_PLAY_SERVICE_ACCOUNT` - Email address of service account.
|
||||
|
|
|
@ -56,8 +56,8 @@ ZCASH_VERSION_NAME=0.1
|
|||
# available on Google Play. This is useful for testing, or for a forked version of the app.
|
||||
ZCASH_RELEASE_APP_NAME=sECCant
|
||||
ZCASH_RELEASE_PACKAGE_NAME=co.electriccoin.zcash
|
||||
|
||||
ZCASH_DEBUG_APP_NAME_SUFFIX=" (D)"
|
||||
ZCASH_SUPPORT_EMAIL_ADDRESS=
|
||||
|
||||
# Set keystore details to enable build signing. Typically these
|
||||
# are overridden via ~/.gradle/gradle.properties to allow secure injection.
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
<string name="support_confirmation_dialog_ok">OK</string>
|
||||
<string name="support_confirmation_dialog_cancel">Cancel</string>
|
||||
<string name="support_confirmation_explanation"><xliff:g id="app_name" example="Zcash">%1$s</xliff:g> is about to open your email app with a pre-filled message.\n\nBe sure to hit send within your email app.</string>
|
||||
<string name="support_email_address">support@electriccoin.co</string>
|
||||
<!-- This is replaced by a resource overlay via app/build.gradle.kts -->
|
||||
<string name="support_email_address"></string>
|
||||
<string name="support_disclaimer">Information provided is handled in accordance with our Privacy Policy.</string>
|
||||
<string name="support_unable_to_open_email">Unable to launch email app.</string>
|
||||
</resources>
|
||||
|
|
Loading…
Reference in New Issue