diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1487bc8b..2e01a9c6 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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 }} diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 7706fdc0..81ff66bb 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -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 diff --git a/README.md b/README.md index 2d61d5dd..1b536f2a 100644 --- a/README.md +++ b/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. diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 41f958fe..4206d77f 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -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 { diff --git a/build.gradle.kts b/build.gradle.kts index 24973d81..e029af9e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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 "", diff --git a/docs/CI.md b/docs/CI.md index d774d010..727ef649 100644 --- a/docs/CI.md +++ b/docs/CI.md @@ -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. diff --git a/gradle.properties b/gradle.properties index ffd2bb4d..07c7f39c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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. diff --git a/ui-lib/src/main/res/ui/support/values/strings.xml b/ui-lib/src/main/res/ui/support/values/strings.xml index d2f29f76..6694eb6c 100644 --- a/ui-lib/src/main/res/ui/support/values/strings.xml +++ b/ui-lib/src/main/res/ui/support/values/strings.xml @@ -7,7 +7,8 @@ OK Cancel %1$s is about to open your email app with a pre-filled message.\n\nBe sure to hit send within your email app. - support@electriccoin.co + + Information provided is handled in accordance with our Privacy Policy. Unable to launch email app.