mirror of
https://github.com/Julow/Unexpected-Keyboard.git
synced 2024-11-25 16:53:24 +01:00
7fb5c992b6
* Rename resulting CI artifact Add details to the name of the artifact, to distiguish downloads of it between multiple branches while testing * Update CI to nodejs16 and improve artifact naming
48 lines
1.5 KiB
YAML
48 lines
1.5 KiB
YAML
name: Make Apk CI
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
Build-Apk:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/setup-java@v3
|
|
with:
|
|
distribution: 'zulu' # See 'Supported distributions' for available options
|
|
java-version: '11'
|
|
- name: Checkout repo
|
|
uses: actions/checkout@v3
|
|
- name: Cache debug certificate
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: _build/debug.keystore
|
|
key: debug-keystore
|
|
- name: Restore debug keystore from github Secrets
|
|
run: |
|
|
mkdir -p _build
|
|
cd "_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
|
|
- name: Build
|
|
run: make
|
|
- name: Artifact naming
|
|
run: |
|
|
artifact="${{github.repository_owner}} ${{github.ref_name}}"
|
|
artifact="${artifact//\//-}" # replace slashes
|
|
echo "artifact=${artifact}" >> $GITHUB_ENV
|
|
- name: Save debug apk
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: "${{env.artifact}} debug_apk"
|
|
path: _build/*.apk
|