Skip to content

android push: 24.4.29 #73

android push: 24.4.29

android push: 24.4.29 #73

Workflow file for this run

name: android v6 push
on:
workflow_dispatch:
push:
tags:
- android.v6.**
env:
main_project_module: app
playstore_name: org.blokada.sex
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./six-android
steps:
- uses: actions/checkout@v3
with:
submodules: false
- name: Initialize and update six-android
run: |
git submodule update --init --recursive .
- name: Get six-android Commit SHA
id: get_ref
run: |
REPO_A_REF=$(git -C . rev-parse HEAD)
echo "REPO_A_REF=${REPO_A_REF}"
echo "REPO_A_REF=${REPO_A_REF}" >> $GITHUB_ENV
- name: Get Workflow Run ID for Commit SHA of six-android
id: get_run_id
run: |
set -o pipefail # Ensure any command failure in the pipeline fails the step
REPO="blokadaorg/six-android"
REF=${{ env.REPO_A_REF }}
# Find the workflow run ID for the specific commit SHA
WORKFLOW_RUN_ID=$(curl -s -H "Authorization: token ${{ secrets.SIXCOMMON_TOKEN }}" \
"https://api.github.com/repos/$REPO/actions/runs?status=completed&branch=main" \
| jq -r ".workflow_runs[] | select(.head_sha == \"$REF\").id" | head -n 1)
echo "WORKFLOW_RUN_ID=${WORKFLOW_RUN_ID}" >> $GITHUB_ENV
- name: Download Artifact from six-android
if: env.WORKFLOW_RUN_ID # Only proceed if we have a valid workflow run ID
run: |
set -o pipefail # Ensure any command failure in the pipeline fails the step
REPO="blokadaorg/six-android"
ARTIFACT_NAME="blokada6.aab"
WORKFLOW_RUN_ID=${{ env.WORKFLOW_RUN_ID }}
# Get the artifact download URL
ARTIFACT_URL=$(curl -s -H "Authorization: token ${{ secrets.SIXCOMMON_TOKEN }}" \
"https://api.github.com/repos/$REPO/actions/runs/$WORKFLOW_RUN_ID/artifacts" \
| jq -r ".artifacts[] | select(.name == \"$ARTIFACT_NAME\").archive_download_url")
# Download the artifact
curl -L -H "Authorization: token ${{ secrets.SIXCOMMON_TOKEN }}" \
-o artifact.zip "$ARTIFACT_URL"
- name: Unzip six-android artifact
if: env.WORKFLOW_RUN_ID # Ensure the artifact was successfully downloaded
run: |
mkdir -p artifact
unzip artifact.zip -d artifact/
echo "Checking extracted paths"
ls -la artifact/
- name: Sign app AAB
uses: r0adkll/sign-android-release@v1
id: sign_app
with:
releaseDirectory: six-android/artifact
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
- name: Upload to Google Play (no review)
id: upload
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}
packageName: org.blokada.sex
releaseFiles: ${{steps.sign_app.outputs.signedReleaseFile}}
track: internal
status: completed
changesNotSentForReview: true
whatsNewDirectory: six-android/whatsnew
continue-on-error: true
- name: Upload to Google Play (with review)
if: always() && steps.upload.outcome == 'failure'
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}
packageName: org.blokada.sex
releaseFiles: ${{steps.sign_app.outputs.signedReleaseFile}}
track: internal
status: completed
whatsNewDirectory: six-android/whatsnew