1- name : Publish Python 🐍 distribution 📦 to PyPI
1+ name : Build and Publish GuGa (PyPI + Android)
22
33on :
44 release :
@@ -9,7 +9,7 @@ permissions:
99 contents : read
1010
1111jobs :
12- build-and-publish :
12+ build-and-publish-pypi :
1313 name : Build and publish Python 🐍 distribution 📦 to PyPI
1414 runs-on : ubuntu-latest
1515 permissions :
3535 uses : pypa/gh-action-pypi-publish@release/v1
3636 with :
3737 packages-dir : server/dist/
38+
39+ build-and-upload-android :
40+ name : Build Android APK 📱
41+ runs-on : ubuntu-latest
42+ permissions :
43+ contents : write # IMPORTANT: Required to upload files to GitHub Releases!
44+
45+ steps :
46+ - name : Checkout Source Code
47+ uses : actions/checkout@v4
48+
49+ - name : Set up JDK 17
50+ uses : actions/setup-java@v4
51+ with :
52+ java-version : ' 17'
53+ distribution : ' temurin'
54+ cache : gradle
55+
56+ - name : Make gradlew executable
57+ run : chmod +x ./gradlew
58+ working-directory : app-stable
59+
60+ - name : Build APK
61+ # We build assembleDebug here so it is natively signed with the default debug key
62+ # and ready for immediate sideloading without throwing Android "unsigned" errors!
63+ run : ./gradlew assembleDebug
64+ working-directory : app-stable
65+
66+ - name : Rename APK
67+ run : mv app-stable/app/build/outputs/apk/debug/app-debug.apk app-stable/app/build/outputs/apk/debug/guga-stable.apk
68+
69+ - name : Upload APK to GitHub Release
70+ # Only explicitly upload it to the release if a release triggered this run
71+ if : github.event_name == 'release'
72+ uses : softprops/action-gh-release@v2
73+ with :
74+ files : app-stable/app/build/outputs/apk/debug/guga-stable.apk
0 commit comments