Skip to content

Commit

Permalink
Add Android CI
Browse files Browse the repository at this point in the history
  • Loading branch information
kra-mo committed Sep 15, 2024
1 parent bb5bdb0 commit 5efcf10
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,38 @@ concurrency:
group: release-${{ github.sha }}

jobs:
android:
name: Android
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable

- name: Build for Android
run: flutter build apk --split-per-abi --release

- name: Zip compiled files
run: |
cd build/app/outputs/flutter-apk/
zip -yr Sly.zip *.apk
- name: Upload zip
uses: actions/upload-artifact@v4
with:
name: Android APK
path: build/app/outputs/flutter-apk/Sly.zip

linux:
name: Linux
runs-on: ubuntu-24.04
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ jobs:
- name: Test
run: ls --recursive

- name: Move Android zip to root
run: mv Android\ APK/*.zip Sly-${{ needs.build.outputs.version }}-Android.zip

- name: Move Linux tar.gz to root
run: mv Linux\ Binary/* Sly-${{ needs.build.outputs.version }}-Linux.tar.gz

Expand Down Expand Up @@ -72,6 +75,7 @@ jobs:
uses: softprops/action-gh-release@v2.0.8
with:
files: |
Sly-${{ needs.build.outputs.version }}-Android.zip
Sly-${{ needs.build.outputs.version }}-Linux.tar.gz
Sly-${{ needs.build.outputs.version }}-macOS.zip
Sly-${{ needs.build.outputs.version }}-Windows.zip
Expand Down

0 comments on commit 5efcf10

Please sign in to comment.