Skip to content

Commit

Permalink
Linux AppImage Build (#501)
Browse files Browse the repository at this point in the history
* try setup flutter from submodule

* try use flutter path

* small change

* revert

* small change to fastlane.yml

* Android appimage

* small android fix

* small change to artifact

* libfuse

* small fixes

* icon

* explicitly copy

* app-bundle

* small fix

* image icon

* Create AppRun
  • Loading branch information
danemadsen authored Apr 20, 2024
1 parent 10612bb commit 6c92ba9
Show file tree
Hide file tree
Showing 4 changed files with 124 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
53 changes: 52 additions & 1 deletion .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,55 @@ 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
path: maid-linux

- name: Install AppImage tools and dependencies
run: |
sudo apt-get update
sudo apt-get install -y appstream util-linux libfuse2
- name: Download and Install AppImageTool
run: |
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
chmod +x appimagetool-x86_64.AppImage
sudo mv appimagetool-x86_64.AppImage /usr/local/bin/appimagetool
- name: Prepare AppDir
run: |
mkdir AppDir
cp -r maid-linux/* AppDir/
cp assets/maid.png AppDir/icon.png
echo '[Desktop Entry]
Name=Maid
Exec=maid
Icon=icon
Type=Application
Categories=Utility;' > AppDir/maid.desktop
chmod +x AppDir/maid
echo '#!/bin/bash
HERE="$(dirname "$(readlink -f "${0}")")"
exec "$HERE/maid" "$@"' > AppDir/AppRun
chmod +x AppDir/AppRun
- name: Create AppImage
run: |
appimagetool AppDir maid.AppImage
- name: Upload AppImage
uses: actions/upload-artifact@v4
with:
name: maid-appimage
path: ./maid.AppImage
8 changes: 8 additions & 0 deletions .github/workflows/fastlane.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
name: Validate Fastlane

on:
push:
branches:
- main
- dev
paths:
- 'fastlane/**'
pull_request:
branches:
- main
- dev
paths:
- 'fastlane/**'

jobs:
validate_metadata:
Expand Down
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 6c92ba9

Please sign in to comment.