Skip to content

Improve the UX of the "Manage Images" menu (#35) #221

Improve the UX of the "Manage Images" menu (#35)

Improve the UX of the "Manage Images" menu (#35) #221

name: Flutter CI
on:
push:
workflow_dispatch:
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: '3.24.5'
- name: Install compiler dependencies
run: sudo apt-get update && sudo apt-get install -y clang ninja-build libgtk-3-dev libmpv-dev mpv
- name: Install project dependencies
run: flutter pub get
- name: Enable linux building
run: flutter config --enable-linux-desktop
- name: Install flutter_distributor
run: flutter pub global activate flutter_distributor
- name: Build artifacts
run: flutter_distributor package --platform linux --target rpm,deb
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: localbooru-linux-binaries
path: build/linux/x64/release/bundle
- name: Upload distro specific package artifacts
uses: actions/upload-artifact@v4
with:
name: localbooru-linux-distro-specific-packages
path: dist
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Enable big longpaths because ruindows
run: git config --system core.longpaths true
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: '3.24.5'
- name: Use pub version of media_kit_video
uses: fjogeleit/yaml-update-action@main
with:
valueFile: 'pubspec.yaml'
commitChange: false
changes: |
{
"pubspec.yaml": {
"dependencies.media_kit_video": "^1.2.4",
"dependency_overrides": {}
}
}
- name: Install project dependencies
run: flutter pub get
- name: Enable windows building
run: flutter config --enable-windows-desktop
- name: Install flutter_distributor
run: flutter pub global activate flutter_distributor
- name: Build artifacts
run: flutter_distributor package --platform windows --target exe
- name: Upload portable artifacts
uses: actions/upload-artifact@v4
with:
name: localbooru-windows-portable
path: build/windows/x64/runner/Release
- name: Upload setup artifacts
uses: actions/upload-artifact@v4
with:
name: localbooru-windows-setup
path: dist
build-macos:
if: false
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: '3.24.5'
- name: Install project dependencies
run: flutter pub get
- name: Enable macOS building
run: flutter config --enable-macos-desktop
- name: Build artifacts
run: flutter build macos --release
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: localbooru-macos
path: build/macos/Build/Products/*/LocalBooru.app
build-android:
runs-on: ubuntu-latest
environment: Production
steps:
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v2
with:
distribution: "temurin"
java-version: 17
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: '3.24.5'
- name: Install project dependencies
run: flutter pub get
- name: Build artifacts
run: flutter build apk --release
- name: Sign APK
uses: ilharp/sign-android-release@v1
id: sign_app
with:
releaseDir: build/app/outputs/apk/release
signingKey: ${{ secrets.KEYSTORE_FILE_BASE64 }}
keyStorePassword: ${{ secrets.KEYSTORE_PASSWORD }}
keyAlias: ${{ secrets.KEYSTORE_KEY_ALIAS }}
keyPassword: ${{ secrets.KEYSTORE_KEY_PASSWORD }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: localbooru-android
path: ${{steps.sign_app.outputs.signedFile}}
package:
runs-on: ubuntu-latest
needs: [build-android, build-windows, build-linux]
steps:
- uses: actions/download-artifact@v4
- name: Create folder
run: mkdir build
- name: Pack Linux binaries
uses: vimtor/[email protected]
with:
files: localbooru-linux-binaries/
dest: build/localbooru-linux-binaries.zip
- name: Pack Windows binaries
uses: vimtor/[email protected]
with:
files: localbooru-windows-portable/
dest: build/localbooru-windows-portable.zip
# - name: Pack macOS
# uses: vimtor/[email protected]
# with:
# files: localbooru-macos/Release/
# dest: build/localbooru-macos.zip
- name: Rename files
run: |
mv localbooru-android/app-release-signed.apk build/localbooru-android.apk
mv localbooru-linux-distro-specific-packages/*/localbooru-*-linux.deb build/localbooru-linux.deb
mv localbooru-linux-distro-specific-packages/*/localbooru-*-linux.rpm build/localbooru-linux.rpm
mv localbooru-windows-setup/*/localbooru-*-windows-setup.exe build/localbooru-windows-setup.exe
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: localbooru-packages
path: build