diff options
| -rw-r--r-- | .github/actions/deploy/action.yml | 23 | ||||
| -rwxr-xr-x | .github/actions/deploy/deploy.sh | 20 | ||||
| -rw-r--r-- | .github/workflows/deploy.yml | 5 | ||||
| -rw-r--r-- | build.gradle | 2 | ||||
| -rw-r--r-- | gradle/apk_module.gradle | 3 | ||||
| -rw-r--r-- | ime/app/src/main/java/com/anysoftkeyboard/ui/tutorials/VersionChangeLogs.java | 2 |
6 files changed, 11 insertions, 44 deletions
diff --git a/.github/actions/deploy/action.yml b/.github/actions/deploy/action.yml index f13035251..186ea79b3 100644 --- a/.github/actions/deploy/action.yml +++ b/.github/actions/deploy/action.yml @@ -3,21 +3,12 @@ description: "Deploys the AnySoftKeyboard artifacts to Play Store" author: "menny" inputs: - deployment_id: - description: "ID given by github" - required: true deployment_environment: description: "Deploy to which environment" required: true deployment_task: description: "Deployment task" required: true - api_user: - description: "github API user" - required: true - api_token: - description: "github API user token" - required: true crash_report_email: default: "none@example.com" description: "email address for crash reporting " @@ -34,12 +25,8 @@ inputs: default: "" description: "APK signing keystore default key password" required: true - publish_service_account_creds_url: - description: "direct download URL to Play-Store credentials file" - default: "" - required: true - publish_service_account: - description: "account for Play-Store API" + publish_service_account_creds_json_file: + description: "path to the json certs file" default: "" required: true runs: @@ -53,17 +40,13 @@ runs: entrypoint: /bin/bash args: - .github/actions/deploy/deploy.sh - - ${{ inputs.deployment_id }} - ${{ inputs.deployment_environment }} - ${{ inputs.deployment_task }} - ${{ inputs.crash_report_email }} - ${{ inputs.keystore_url }} - ${{ inputs.keystore_password }} - ${{ inputs.keystore_key_password }} - - ${{ inputs.publish_service_account_creds_url }} - - ${{ inputs.publish_service_account }} - - ${{ inputs.api_user }} - - ${{ inputs.api_token }} + - ${{ inputs.publish_service_account_creds_json_file }} branding: icon: 'upload-cloud' diff --git a/.github/actions/deploy/deploy.sh b/.github/actions/deploy/deploy.sh index 54b3c9476..ca1cab44a 100755 --- a/.github/actions/deploy/deploy.sh +++ b/.github/actions/deploy/deploy.sh @@ -1,7 +1,5 @@ #!/usr/bin/env bash set -e -DEPLOYMET_ID="${1}" -shift DEPLOYMENT_ENVIRONMENT="${1}" shift DEPLOYMENT_TASK="${1}" @@ -14,13 +12,7 @@ export KEY_STORE_FILE_PASSWORD="${1}" shift export KEY_STORE_FILE_DEFAULT_ALIAS_PASSWORD="${1}" shift -PUBLISH_CERT_FILE_URL="${1}" -shift -export PUBLISH_APK_SERVICE_ACCOUNT_EMAIL="${1}" -shift -API_USER="${1}" -shift -API_TOKEN="${1}" +PUBLISH_CERT_JSON_FILE="${1}" shift function deployProcessFromEnvironmentName() { @@ -55,17 +47,11 @@ if [[ -z "${KEYSTORE_FILE_URL}" ]]; then exit 1 fi -if [[ -z "${PUBLISH_CERT_FILE_URL}" ]]; then - echo "Could not find secure env variable PUBLISH_CERT_FILE_URL. Can not deploy." - exit 1 -fi - wget --tries=5 --waitretry=5 "${KEYSTORE_FILE_URL}" -q -O /tmp/anysoftkeyboard.keystore stat /tmp/anysoftkeyboard.keystore -wget --tries=5 --waitretry=5 "${PUBLISH_CERT_FILE_URL}" -q -O /tmp/apk_upload_key.p12 -stat /tmp/apk_upload_key.p12 +stat "${PUBLISH_CERT_JSON_FILE}" -DEPLOY_TASKS=( "-PwithAutoVersioning" ":generateFdroidYamls" "-DdeployChannel=${DEPLOY_CHANNEL}" "-DdeployFraction=${FRACTION}" ) +DEPLOY_TASKS=( "--stacktrace" "-PwithAutoVersioning" ":generateFdroidYamls" "-DdeployChannel=${DEPLOY_CHANNEL}" "-DdeployFraction=${FRACTION}" ) if [[ "${DEPLOYMENT_TASK}" == "deploy" ]]; then case "${PROCESS_NAME}" in diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index beecea34b..ea8c416c1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -28,8 +28,8 @@ jobs: mkdir -p outputs/apks || true mkdir -p outputs/fdroid || true mkdir -p ime/app/build/outputs/mapping || true + echo "${{ secrets.PUBLISH_CERT_JSON_STRING }}" > /tmp/apk_upload_key.json - name: status-in-progress - if: failure() run: ./gradlew --stacktrace :deployment:updateDeploymentState -PRequest.apiUsername="${{ secrets.BOT_MASTER_RW_GITHUB_USERNAME }}" -PRequest.apiUserToken="${{ secrets.BOT_MASTER_RW_GITHUB_TOKEN }}" -PrequestStatus.environment="${{ github.event.deployment.environment }}" -PrequestStatus.deployment_id="${{ github.event.deployment.id }}" -PrequestStatus.deployment_state="in_progress" - uses: ./.github/actions/deploy with: @@ -40,8 +40,7 @@ jobs: keystore_url: ${{ secrets.ANYSOFTKEYBOARD_KEYSTORE_URL }} keystore_password: ${{ secrets.ANYSOFTKEYBOARD_KEYSTORE_PASSWORD }} keystore_key_password: ${{ secrets.ANYSOFTKEYBOARD_KEYSTORE_KEY_PASSWORD }} - publish_service_account_creds_url: ${{ secrets.PUBLISH_CERT_FILE_URL }} - publish_service_account: ${{ secrets.PUBLISH_APK_SERVICE_ACCOUNT_EMAIL }} + publish_service_account_creds_json_file: /tmp/apk_upload_key.json api_user: ${{ secrets.BOT_MASTER_RW_GITHUB_USERNAME }} api_token: ${{ secrets.BOT_MASTER_RW_GITHUB_TOKEN }} - name: status-success diff --git a/build.gradle b/build.gradle index 6ddd5d0ef..b2f72fd8e 100644 --- a/build.gradle +++ b/build.gradle @@ -15,7 +15,7 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:3.5.3' - classpath 'com.github.triplet.gradle:play-publisher:2.4.2' + classpath 'com.github.triplet.gradle:play-publisher:2.6.2' classpath 'net.ltgt.gradle:gradle-errorprone-plugin:1.1.1' classpath 'gradle.plugin.com.github.sherter.google-java-format:google-java-format-gradle-plugin:0.8' classpath 'net.evendanan.autoversion:gradle-plugin:0.2.2' diff --git a/gradle/apk_module.gradle b/gradle/apk_module.gradle index ff8a3465d..0964fda28 100644 --- a/gradle/apk_module.gradle +++ b/gradle/apk_module.gradle @@ -91,8 +91,7 @@ if (project.ext.shouldBePublished) { } else { releaseStatus = 'completed' } - serviceAccountEmail = System.getenv().getOrDefault('PUBLISH_APK_SERVICE_ACCOUNT_EMAIL', 'dummy@example.com') - serviceAccountCredentials = file('/tmp/apk_upload_key.p12') + serviceAccountCredentials = file('/tmp/apk_upload_key.json') if ('alpha' != track) { //to keep things simple, we will only specify release-notes in the alpha diff --git a/ime/app/src/main/java/com/anysoftkeyboard/ui/tutorials/VersionChangeLogs.java b/ime/app/src/main/java/com/anysoftkeyboard/ui/tutorials/VersionChangeLogs.java index c4b480574..003e9982d 100644 --- a/ime/app/src/main/java/com/anysoftkeyboard/ui/tutorials/VersionChangeLogs.java +++ b/ime/app/src/main/java/com/anysoftkeyboard/ui/tutorials/VersionChangeLogs.java @@ -18,7 +18,7 @@ public class VersionChangeLogs { "r4", Uri.parse( "https://github.com/AnySoftKeyboard/AnySoftKeyboard/milestone/92"), - "Upgrading may result in a Coronavirus exposure.\n", + "A few bugs fixes.", "YABTU.", "Updated translations.")); log.add( |
