-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (67 loc) · 3.27 KB
/
android.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Android
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout your project
- uses: actions/checkout@v2
# Make sure the latest GraalVM is installed.
# after this step env.JAVA_HOME and env.GRAALVM_HOME will point to the GraalVM location
- name: Setup GraalVM built by Gluon
uses: gluonhq/setup-graalvm@master
# set GITHUB_TOKEN to avoid exceeding GitHub's API rate limit
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Install extra requirements on top of ubuntu-latest
- name: Install libraries
run: |
sudo apt-get update
sudo apt install libasound2-dev libavcodec-dev libavformat-dev libavutil-dev libgl-dev libgtk-3-dev libpango1.0-dev libxtst-dev
# Setup the Android keystore, based on a repo secret. See the section 'Setup Android Keystore' below.
#- name: Setup Android Keystore
# id: android_keystore_file
# uses: timheuer/base64-to-file@v1
# with:
# fileName: 'my.keystore'
# encodedString: ${{ secrets.GLUON_ANDROID_KEYSTORE_BASE64 }}
# Install the Gluon License (optional)
# Using this step requires you to set a GLUON_LICENSE secret in the secret configuration of your repo. Have a look at https://gluonhq.com/products/mobile/buy for more information about obtaining a license.
#- name: Gluon License
# uses: gluonhq/gluon-build-license@v1
# with:
# gluon-license: ${{ secrets.GLUON_LICENSE }}
# Build your project using Maven
# The android profile is used, which means a native build will be created for the gluonfx target android.
# This step also uses some env variables taken from the repo secrets. See the section 'Setup Android Keystore' below.
- name: Gluon Build
run: mvn -e -X -Pandroid gluonfx:build gluonfx:package
env:
ANDROID_SDK_ROOT: /home/runner/.gluon/substrate/Android
# GLUON_ANDROID_KEYSTOREPATH: ${{ steps.android_keystore_file.outputs.filePath }}
# GLUON_ANDROID_KEYSTORE_PASSWORD: ${{ secrets.GLUON_ANDROID_KEYSTORE_PASSWORD }}
# GLUON_ANDROID_KEYALIAS: ${{ secrets.GLUON_ANDROID_KEYALIAS }}
# GLUON_ANDROID_KEYALIAS_PASSWORD: ${{ secrets.GLUON_ANDROID_KEYALIAS_PASSWORD }}
- name: Cat log
if: failure()
run: cat /home/runner/work/mobile/mobile/target/gluonfx/log/process-package*.log
# Create staging directory in which the apk will be copied
- name: Make staging directory
run: mkdir staging
# Copy the apk to the staging directory
- name: Copy native images to staging
run: cp -r target/gluonfx/aarch64-android/gvm/*.apk staging
# Upload the staging directoy as a build artifact
- name: Upload
uses: actions/upload-artifact@v4
with:
name: Package
path: staging
# Upload the aab to the Google Play Store. See the section below.
#- name: Upload to Google Play
# uses: r0adkll/[email protected]
# with:
# serviceAccountJsonPlainText: ${{ secrets.GLUON_ANDROID_SERVICE_ACCOUNT_JSON }}
# packageName: com.gluonhq.samples.hellogluon
# releaseFiles: target/gluonfx/aarch64-android/gvm/HelloGluon.aab
# track: beta