66 lines
2.2 KiB
YAML
66 lines
2.2 KiB
YAML
name: Android Master CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
|
|
jobs:
|
|
apk:
|
|
name: Generate APK
|
|
runs-on: ubuntu-18.04
|
|
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- name: set up JDK 1.8
|
|
uses: actions/setup-java@v1
|
|
with:
|
|
java-version: 1.8
|
|
- name: Android NDK toolchain Setup
|
|
uses: ravinderjangra/android-ndk-toolchain-setup@0.2
|
|
with:
|
|
# Android API
|
|
api: 20 # default is 21
|
|
# Platform arch
|
|
arch: x86
|
|
# Path to use for NDK toolchain
|
|
install-location: toolchains
|
|
# Force install toolchain
|
|
force: true # optional, default is false
|
|
# Add toolchain to the path
|
|
add-to-path: true # optional, default is true
|
|
- name: Create google-services.json
|
|
uses: timheuer/base64-to-file@v1.0.3
|
|
with:
|
|
# Name of the file when written to temp location
|
|
fileName: google-services.json # default is decoded-file.file
|
|
# The base64 encoded string
|
|
encodedString: ${{ secrets.GOOGLE_SERVICES }}
|
|
- name: Copy google-services.json to app
|
|
uses: canastro/copy-action@0.0.2
|
|
with:
|
|
# Source file
|
|
source: ${{ steps.write_file.outputs.filePath }}
|
|
# Target file
|
|
target: ${{ GITHUB_WORKSPACE }}/app/google-services.json
|
|
- name: Build Release APK
|
|
run: bash ./gradlew assembleStandard --stacktrace
|
|
- name: Sign Android release
|
|
uses: r0adkll/sign-android-release@v1
|
|
with:
|
|
# The directory to find your release to sign
|
|
releaseDirectory: app/build/outputs/apk/release
|
|
# The key used to sign your release in base64 encoded format
|
|
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
|
|
# The key alias
|
|
alias: ${{ secrets.ALIAS }}
|
|
# The password to the keystore
|
|
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
|
|
# The password for the key
|
|
keyPassword: ${{ secrets.KEY_PASSWORD }}
|
|
- name: Upload APK
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: TachiyomiSY-${{ github.sha }}
|
|
path: ${{ SIGNED_RELEASE_FILE }}
|