Skip to content

Commit

Permalink
add android deploy action
Browse files Browse the repository at this point in the history
  • Loading branch information
azarz committed Nov 16, 2023
1 parent 8c3b5a1 commit 878834f
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 1 deletion.
58 changes: 58 additions & 0 deletions .github/workflows/android-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Android Deploy

on:
workflow_dispatch:
push:
tags:
- '**'

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout source
uses: actions/checkout@v3

- name: Make envfile
uses: SpicyPizza/create-envfile@v1.3
with:
directory: .
file_name: .env
envkey_GP_TOKEN: ${{ secrets.GP_TOKEN }}
fail_on_empty: false

- name: Get the tagname
id: get_tagname
run: echo TAGNAME=$(echo ${GITHUB_REF##*/}) >> $GITHUB_OUTPUT

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20

- name: Install app dependencies
run: npm install

- name: Build Android Release APK
run: cd android && ./gradlew assembleRelease

- name: Sign Release APK
uses: r0adkll/sign-android-release@v1
id: sign_apk
with:
releaseDirectory: android/app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}

- name: Deploy to PlayStore
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}
packageName: fr.ign.geoportail
releaseFiles: ${{ steps.sign_apk.outputs.signedReleaseFile }}
track: qa
status: completed
releaseName: ${{ steps.get_tagname.outputs.TAGNAME }}
inAppUpdatePriority: 5
2 changes: 1 addition & 1 deletion deploiement-appli-mobile.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
## Capacitor
- `npm run build`
- `npx cap sync`
- `npx cap build --keystorepath "c:/Users/amaur/Downloads/ign.keystore" --keystorepass "G3oportail" --keystorealias "geoportail_mobile" --keystorealiaspass "G3oportail" --androidreleasetype "APK" android`
- `cd android && ./gradlew assembleRelease`
- `zipalign 4 ./android/app/build/outputs/apk/release/app-release-signed.apk ./android/app/build/outputs/apk/release/app-release-aligned.apk`
- `apksigner sign --ks /<chemin_vers>/ign.keystore --v1-signing-enabled true --v2-signing-enabled true ./android/app/build/outputs/apk/release/app-release-aligned.apk`

Expand Down

0 comments on commit 878834f

Please sign in to comment.