skyline/.github/workflows/ci.yml
PixelyIon b91ce939a2 Introduce CI build signing
We've done no signing of any Skyline APKs to date which causes issues regarding authenticity of any APKs as they could be entirely unofficial builds which have not been vetted by the team. Additionally, the different keys remove the ability to reinstall a different build successively as Android checks for matching signatures before installing an APK.
2022-05-31 01:25:18 +05:30

80 lines
2.2 KiB
YAML

name: CI
on: [ push, pull_request ]
jobs:
build:
runs-on: ubuntu-latest
env:
JVM_OPTS: -Xmx6G
steps:
- name: Git Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Restore Gradle Cache
uses: actions/cache@v3
with:
path: /root/.gradle/
key: ${{ runner.os }}-gradle-${{ hashFiles('**/build.gradle') }}
- name: Restore CXX Cache
uses: actions/cache@v3
with:
path: app/.cxx/
key: ${{ runner.os }}-cxx-${{ hashFiles('**/CMakeLists.txt') }}
- name: Install Ninja Build
run: |
sudo apt-get install -y ninja-build
ln -s /usr/bin/ninja .
- name: Install CMake & Android NDK
run: echo "yes" | $ANDROID_HOME/tools/bin/sdkmanager "cmake;3.18.1" "ndk;25.0.8221429" --channel=3 | grep -v = || true
- name: Android Lint
run: |
chmod +x gradlew
./gradlew --stacktrace lint
- name: Upload Lint Report
uses: actions/upload-artifact@v2
with:
name: lint-result.html
path: app/build/reports/lint-results-debug.html
- name: Decode Keystore
env:
KEYSTORE_ENCODED: ${{ secrets.KEYSTORE }}
run: echo $KEYSTORE_ENCODED | base64 --decode > "$HOME/keystore.jks"
- name: Android Assemble
env:
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
run: ./gradlew --stacktrace assemble
- name: Upload Debug APK
uses: actions/upload-artifact@v2
with:
name: app-debug.apk
path: app/build/outputs/apk/debug/
- name: Upload Release APK
uses: actions/upload-artifact@v2
with:
name: app-release.apk
path: app/build/outputs/apk/release/
- name: Upload R8 Mapping
uses: actions/upload-artifact@v2
with:
name: mapping.txt
path: app/build/outputs/mapping/release/
- name: Delete Build Folder
run: rm -rf app/build/