Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Android to Google Play (internal testing) | |
on: | |
release: | |
types: | |
[prereleased, released] | |
jobs: | |
build-android: | |
runs-on: ${{ matrix.os }} | |
if: | | |
startsWith(github.ref, 'refs/tags/@quiet/mobile') | |
strategy: | |
matrix: | |
os: [ubuntu-20.04] | |
steps: | |
- name: "Print OS" | |
run: echo ${{ matrix.os }} | |
- uses: actions/checkout@v2 | |
- name: "Set up JDK" | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: 11 | |
- name: "Set up NDK" | |
uses: nttld/setup-ndk@v1 | |
id: setup-ndk | |
with: | |
ndk-version: r21e | |
add-to-path: false | |
- name: "Setup environment" | |
uses: ./.github/actions/setup-env | |
with: | |
bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,@quiet/mobile,backend-bundle" | |
- name: "Create gradle configuration directory" | |
run: mkdir -p $HOME/.gradle | |
- name: "Prepare ndk configuration" | |
run: | | |
printf "\ | |
NDK_PATH=${{ steps.setup-ndk.outputs.ndk-path }}\n\ | |
" > $HOME/.gradle/gradle.properties | |
- name: "Prepare signing configuration" | |
run: | | |
printf "\ | |
STORE_FILE=quietmobile.keystore\n\ | |
STORE_PASSWORD=${{ SECRETS.GOOGLE_KEYSTORE_PASSWORD }}\n\ | |
KEY_ALIAS=${{ SECRETS.GOOGLE_KEYSTORE_ALIAS }}\n\ | |
KEY_PASSWORD=${{ SECRETS.GOOGLE_KEYSTORE_PASSWORD }}\ | |
" >> $HOME/.gradle/gradle.properties | |
- name: "Decode keystore" | |
run: echo ${{ SECRETS.GOOGLE_KEYSTORE }} | base64 --decode > ./packages/mobile/android/app/quietmobile.keystore | |
- name: "Build for Android" | |
run: cd ./packages/mobile/android && ENVFILE=../.env.production ./gradlew bundleStandardRelease | |
# Temporary disable, failing on CI | |
# - name: "Upload Artifact" | |
# continue-on-error: true | |
# uses: actions/upload-artifact@v2 | |
# with: | |
# name: app-standard-release.aab | |
# path: ./packages/mobile/android/app/build/outputs/bundle/standardRelease/app-standard-release.aab | |
# retention-days: 5 | |
- name: "Configure Google Play upload" | |
run: | | |
mkdir -p distribution/whatsnew | |
git log -1 --pretty=format:%s > distribution/whatsnew/whatsnew-pl-PL | |
echo ${{ SECRETS.SERVICE_ACCOUNT_JSON }} | base64 --decode > google-play.json | |
- name: "Upload to Google Play" | |
uses: r0adkll/[email protected] | |
with: | |
serviceAccountJson: google-play.json | |
packageName: com.quietmobile | |
releaseFiles: ./packages/mobile/android/app/build/outputs/bundle/standardRelease/app-standard-release.aab | |
status: completed | |
track: internal | |
whatsNewDirectory: distribution/whatsnew | |
changesNotSentForReview: true |