-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0f0b2b3
commit bd72820
Showing
2 changed files
with
54 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Build APK | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build-android: | ||
name: Build for Android | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: 17 | ||
distribution: 'adopt' | ||
|
||
- name: Get Date | ||
id: get-date | ||
run: | | ||
echo "::save-state name=date::$(/bin/date -u "+%Y%m%d")" | ||
shell: bash | ||
|
||
- name: Cache Buildozer global directory | ||
uses: actions/cache@v2 | ||
with: | ||
path: .buildozer_global | ||
key: buildozer-global-${{ hashFiles('buildozer.spec') }} # Replace with your path | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: .buildozer | ||
key: ${{ runner.os }}-${{ steps.get-date.outputs.date }}-${{ hashFiles('buildozer.spec') }} | ||
|
||
|
||
- name: Build with Buildozer | ||
run: | | ||
pip3 install --user --upgrade buildozer Cython virtualenv | ||
export PATH=$PATH:~/.local/bin/ | ||
export APP_ANDROID_ACCEPT_SDK_LICENSE=1 | ||
export BUILDOZER_WARN_ON_ROOT=0 | ||
sudo apt update | ||
sudo apt install -y git zip unzip openjdk-17-jdk python3-pip autoconf libtool pkg-config zlib1g-dev libncurses5-dev libncursesw5-dev libtinfo5 cmake libffi-dev libssl-dev | ||
cd ${{ github.workspace }} | ||
buildozer appclean | ||
buildozer android debug | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: package | ||
path: bin/*.apk |
This file was deleted.
Oops, something went wrong.