2024-01-07 10:10:44 +00:00
|
|
|
name: Android CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches-ignore:
|
|
|
|
- ''
|
|
|
|
push:
|
2024-01-16 10:02:33 +00:00
|
|
|
tags:
|
|
|
|
- 'v*'
|
2024-01-07 10:10:44 +00:00
|
|
|
branches-ignore:
|
|
|
|
- ''
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
2024-02-03 07:55:36 +00:00
|
|
|
FCLTeamBuild:
|
2024-02-03 03:18:48 +00:00
|
|
|
if: github.repository_owner == 'FCL-Team'
|
2024-01-16 05:53:43 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
arch: [ "all", "arm", "arm64", "x86", "x64" ]
|
|
|
|
fail-fast: false
|
2024-01-14 01:22:55 +00:00
|
|
|
env:
|
|
|
|
FCL_KEYSTORE_PASSWORD: ${{ secrets.FCL_KEYSTORE_PASSWORD }}
|
2024-01-16 05:53:43 +00:00
|
|
|
name: Build for ${{matrix.arch}}
|
2024-01-07 10:10:44 +00:00
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
2024-01-16 05:53:43 +00:00
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2024-01-07 10:10:44 +00:00
|
|
|
|
2024-01-16 05:53:43 +00:00
|
|
|
- name: set up JDK 17
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: 17
|
2024-01-07 10:10:44 +00:00
|
|
|
|
2024-01-16 10:02:33 +00:00
|
|
|
- name: Build ${{matrix.arch}} .apk
|
2024-01-16 05:53:43 +00:00
|
|
|
run: |
|
|
|
|
chmod +x gradlew
|
2024-01-16 10:02:33 +00:00
|
|
|
./gradlew assemblerelease -Darch=${{matrix.arch}}
|
|
|
|
|
|
|
|
- name: Release
|
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
with:
|
|
|
|
token: "${{ secrets.TOKEN }}"
|
|
|
|
files: |
|
|
|
|
FCL/build/outputs/apk/release/*.apk
|
2024-01-16 05:53:43 +00:00
|
|
|
|
2024-02-03 07:55:36 +00:00
|
|
|
- name: Upload apk
|
2024-01-16 10:02:33 +00:00
|
|
|
if: startsWith(github.ref, 'refs/heads/')
|
2024-01-16 05:53:43 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2024-01-16 10:02:33 +00:00
|
|
|
name: app-${{matrix.arch}}
|
|
|
|
path: FCL/build/outputs/apk/release/*
|
2024-01-16 05:53:43 +00:00
|
|
|
# retention-days: 1
|
2024-02-03 07:55:36 +00:00
|
|
|
|
|
|
|
#only for fork
|
|
|
|
DebugBuild:
|
|
|
|
if: github.repository_owner != 'FCL-Team'
|
|
|
|
name: Build Debug
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: set up JDK 17
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: 17
|
|
|
|
|
|
|
|
- name: Build debug apk
|
|
|
|
run: |
|
|
|
|
chmod +x gradlew
|
|
|
|
./gradlew assemblefordebug -Darch=all
|
|
|
|
|
|
|
|
- name: Upload debug apk
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: app-debug-all
|
|
|
|
path: FCL/build/outputs/apk/fordebug/*
|