-
-
Notifications
You must be signed in to change notification settings - Fork 166
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
5014c76
commit 6ae1236
Showing
2 changed files
with
91 additions
and
80 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 |
---|---|---|
@@ -1,90 +1,13 @@ | ||
name: Build Linux | ||
|
||
on: | ||
release: | ||
types: [published] | ||
push: | ||
branches: | ||
- main | ||
- dev | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Setup Flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: '3.19.5' | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y cmake ninja-build pkg-config libgtk-3-dev libvulkan-dev | ||
- name: Build Linux App | ||
run: | | ||
flutter pub get | ||
flutter build linux | ||
- name: Upload Linux Build | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: maid-linux | ||
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 | ||
uses: ./.github/workflows/reusable/reusable-build-linux.yml | ||
with: | ||
flutter_version: '3.19.5' |
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,88 @@ | ||
name: Reusable Build Linux | ||
on: | ||
workflow_call: | ||
inputs: | ||
flutter_version: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
build-linux: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Setup Flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: ${{ inputs.flutter_version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y cmake ninja-build pkg-config libgtk-3-dev libvulkan-dev | ||
- name: Build Linux App | ||
run: | | ||
flutter pub get | ||
flutter build linux | ||
- name: Upload Linux Build | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: maid-linux | ||
path: build/linux/x64/release/bundle | ||
|
||
create-appimage: | ||
needs: build-linux | ||
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 |