Skip to content

Commit

Permalink
Android appimage
Browse files Browse the repository at this point in the history
  • Loading branch information
danemadsen committed Apr 20, 2024
1 parent b6ce9e3 commit ccdb4a1
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build Android

on:
release:
types: [published]
types: [published]
push:
branches:
- main
Expand Down
42 changes: 41 additions & 1 deletion .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,44 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: maid-linux
path: build/linux/x64/release/bundle
path: build/linux/x64/release/bundle

create-appimage:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Download Linux Build
uses: actions/download-artifact@v4
with:
name: maid-linux

- name: Setup AppImage tools
run: |
sudo apt-get update
sudo apt-get install -y appimagetool
- name: Prepare AppDir
run: |
mkdir -p AppDir/usr/bin
cp -r maid-linux/* AppDir/usr/bin/
cp assets/maid.png AppDir/usr/bin/
echo '[Desktop Entry]
Name=Maid
Exec=maid
Icon=maid.png
Type=Application
Categories=Utility;' > AppDir/maid.desktop
chmod +x AppDir/usr/bin/maid
- name: Create AppImage
run: |
appimagetool AppDir maid.AppImage
- name: Upload AppImage
uses: actions/upload-artifact@v4
with:
name: maid-appimage
path: ./maid.AppImage
63 changes: 63 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: New Release

on:
workflow_dispatch:

jobs:
build_android:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.5'

- name: Decode Keystore File
env:
KEYSTORE: ${{ secrets.KEYSTORE }}
run: echo "$KEYSTORE" | base64 --decode > android/app/key.jks

- name: Create key.properties
run: |
echo "storeFile=key.jks" > android/key.properties
echo "storePassword=${{ secrets.STORE_PASSWORD }}" >> android/key.properties
echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties
echo "releasePassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties
echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> android/key.properties
echo "releaseAlias=${{ secrets.KEY_ALIAS }}" >> android/key.properties
- name: Setup Flutter
run: |
flutter config --no-analytics
flutter pub get
- name: Build APK
run: |
flutter build apk --split-per-abi
- name: Upload APK
uses: actions/upload-artifact@v4
with:
name: maid-android-apk
path: build/app/outputs/apk/release

- name: Build appbundle
run: |
flutter build appbundle
- name: Upload AAB
uses: actions/upload-artifact@v4
with:
name: maid-android-aab
path: build/app/outputs/bundle/release/app-release.aab

0 comments on commit ccdb4a1

Please sign in to comment.