aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/actions/deploy/action.yml23
-rwxr-xr-x.github/actions/deploy/deploy.sh20
-rw-r--r--.github/workflows/deploy.yml5
3 files changed, 8 insertions, 40 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