2022-03-24 18:42:44 +01:00
|
|
|
name: Make Apk CI
|
2022-02-14 00:42:41 +01:00
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
2022-03-24 18:42:44 +01:00
|
|
|
Build-Apk:
|
2022-03-27 16:08:26 +02:00
|
|
|
runs-on: ubuntu-latest
|
2022-02-14 00:42:41 +01:00
|
|
|
steps:
|
2022-04-02 16:33:12 +02:00
|
|
|
- name: Cache fontforge and extra dependencies
|
2022-03-27 16:08:26 +02:00
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
2022-04-02 16:33:12 +02:00
|
|
|
path: /usr/local/bin
|
|
|
|
key: usr-local-bin
|
|
|
|
- name: Install latest FontForge version (using AppImage)
|
|
|
|
run: |
|
|
|
|
# Get most recent version of FontForge
|
|
|
|
# Using AppImage there is no dependecy problem, it is the latest version and it's easier to cache
|
|
|
|
cd /usr/local/bin
|
|
|
|
sudo wget -c -N https://github.com/fontforge/fontforge/releases/download/20220308/FontForge-2022-03-08-582bd41-x86_64.AppImage
|
|
|
|
sudo chmod +x ./FontForge-2022-03-08-582bd41-x86_64.AppImage
|
|
|
|
sudo ln --symbolic --force /usr/local/bin/FontForge-2022-03-08-582bd41-x86_64.AppImage /usr/local/bin/fontforge
|
2022-03-24 02:44:17 +01:00
|
|
|
- uses: actions/setup-java@v2
|
|
|
|
with:
|
|
|
|
distribution: 'zulu' # See 'Supported distributions' for available options
|
|
|
|
java-version: '11'
|
2022-03-25 00:24:33 +01:00
|
|
|
- name: Checkout repo
|
|
|
|
uses: actions/checkout@v2
|
2022-02-14 00:42:41 +01:00
|
|
|
- name: Cache debug certificate
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: _build/debug.keystore
|
|
|
|
key: debug-keystore
|
2022-04-02 16:33:12 +02:00
|
|
|
- name: Restore debug keystore from github Secrets
|
|
|
|
run: |
|
|
|
|
mkdir -p _build
|
|
|
|
cd "$GITHUB_WORKSPACE/_build"
|
|
|
|
# Check if exist and use the secret named DEBUG_KEYSTORE
|
|
|
|
# The contents of the secret can be obtained -
|
|
|
|
# from the debug.keystore.asc from you local _build folder
|
|
|
|
if [[ ! "${{ secrets.DEBUG_KEYSTORE }}" == "" ]]; then
|
|
|
|
echo "${{ secrets.DEBUG_KEYSTORE }}" > "debug.keystore.asc"
|
|
|
|
if [[ -s "debug.keystore.asc" ]]; then
|
|
|
|
gpg -d --passphrase "debug0" --batch "debug.keystore.asc" > "debug.keystore"
|
|
|
|
fi
|
|
|
|
fi
|
2022-03-24 02:44:17 +01:00
|
|
|
- name: Build
|
|
|
|
run: make
|
2022-02-14 00:42:41 +01:00
|
|
|
- name: Save debug apk
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: debug apk
|
|
|
|
path: _build/*.apk
|