32 lines
914 B
YAML
32 lines
914 B
YAML
name: Build Android
|
|
on: [pull_request, push]
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout the code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: set up JDK
|
|
uses: actions/setup-java@v3
|
|
with:
|
|
java-version: '17'
|
|
distribution: 'temurin'
|
|
cache: gradle
|
|
|
|
- name: Prepare signing
|
|
run: |
|
|
touch keystore.properties
|
|
echo "storePassword=$STOREPASSWORD" >> keystore.properties
|
|
echo "keyPassword=$KEYPASSWORD" >> keystore.properties
|
|
echo "keyAlias=key0" >> keystore.properties
|
|
echo "storeFile=../AndroidKey" >> keystore.properties
|
|
|
|
- name: Generate versionCode
|
|
run: |
|
|
touch version.properties
|
|
let timestamp=$(date +%s)/10
|
|
echo "versionCode=$timestamp" >> version.properties
|
|
|
|
- name: Build the app
|
|
run: ./gradlew build |