feat: add flutter_distributor
This adds flutter_distributor to build AppImage, deb, rpm and zip for Linux x86 when a new release is tagged. - Close #97 - Close #90
This commit is contained in:
parent
38e0a833ad
commit
d4893b5d2c
|
@ -30,11 +30,11 @@ jobs:
|
|||
run: flutter config --enable-linux-desktop
|
||||
- name: Build artifacts 🏗️
|
||||
run: flutter build linux --release
|
||||
- name: Build output 🌳
|
||||
- name: Show artifacts 👀
|
||||
run: tree build/linux/x64/release/bundle
|
||||
- name: Upload artifacts ⤴️
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Quickgui-${{github.run_number}}-linux.zip
|
||||
name: Quickgui-${{github.run_number}}-linux-x64
|
||||
path: build/linux/x64/release/bundle
|
||||
overwrite: true
|
||||
|
|
|
@ -0,0 +1,93 @@
|
|||
name: Publish Quickgui 🏷️
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v?[0-9]+.[0-9]+.[0-9]+*"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: "The existing tag to publish"
|
||||
type: "string"
|
||||
required: true
|
||||
|
||||
# TODO: arm64 runner
|
||||
# https://github.blog/changelog/2024-06-03-actions-arm-based-linux-and-windows-runners-are-now-in-public-beta/
|
||||
|
||||
jobs:
|
||||
version-check:
|
||||
# The git tag and pubspec.yaml version must be identical.
|
||||
name: "Check versions ⚖️"
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: "Compare App and Git versions 🟰"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
APP_VERSION=$(grep "^version" pubspec.yaml | cut -d' ' -f2)
|
||||
GIT_VERSION=$(git describe --tags | cut -d'-' -f1)
|
||||
echo "App version: ${REL_VERSION}"
|
||||
echo "Git version: ${GIT_VERSION}"
|
||||
if [ "${APP_VERSION}" != "${GIT_VERSION}" ]; then
|
||||
echo "ERROR! Version mismatch.";
|
||||
exit 1
|
||||
fi
|
||||
|
||||
build-linux-x64:
|
||||
needs: [version-check]
|
||||
name: "Build Linux x64 🏗️"
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: stable
|
||||
architecture: x64
|
||||
flutter-version-file: pubspec.yaml
|
||||
- name: Install system dependencies 📦️
|
||||
run: sudo apt-get install -y clang cmake libblkid1 liblzma5 libgtk-3-0 libgtk-3-dev ninja-build pkg-config
|
||||
- name: Install Flutter dependencies 🦋
|
||||
run: flutter pub get
|
||||
- name: Activate flutter_distributor 🚀
|
||||
run: dart pub global activate flutter_distributor
|
||||
- name: Build AppImage 🐧
|
||||
run: |
|
||||
sudo apt-get install -y libfuse-dev locate
|
||||
wget -q "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage" -O /usr/local/bin/appimagetool
|
||||
chmod +x /usr/local/bin/appimagetool
|
||||
flutter_distributor package --platform=linux --targets=appimage
|
||||
- name: Build .deb 🍥
|
||||
run: |
|
||||
sudo apt-get install -y dpkg
|
||||
flutter_distributor package --platform=linux --targets=deb
|
||||
- name: Build .rpm 🎩
|
||||
run: |
|
||||
sudo apt-get install -y patchelf rpm
|
||||
flutter_distributor package --platform=linux --targets=rpm
|
||||
- name: Build .zip 🤐
|
||||
run: flutter_distributor package --platform=linux --targets=zip
|
||||
- name: Show artifacts 👀
|
||||
run: tree dist/
|
||||
|
||||
publish-release:
|
||||
needs: [build-linux-x64]
|
||||
name: "Publish Release 📤️"
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Publish release ${{ github.ref }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
REL_VER=$(grep "^version" pubspec.yaml | cut -d' ' -f2)
|
||||
gh release create "${{ github.ref }}" --draft --generate-notes
|
||||
for PKG in AppImage deb rpm zip; do
|
||||
gh release upload "${{ github.ref }}" "dist/${REL_VER}/quickgui-${REL_VER}-linux.${PKG}" --clobber
|
||||
done
|
||||
if [ "$(gh release view "${{ github.ref }}" --json assets --template '{{len .assets}}')" -lt 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
gh release edit "${{ github.ref }}" --draft=false
|
|
@ -4,6 +4,7 @@
|
|||
.dart_tool/
|
||||
.packages
|
||||
build/
|
||||
dist/
|
||||
# If you're building an application, you may want to check-in your pubspec.lock
|
||||
pubspec.lock
|
||||
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
output: dist/
|
||||
releases:
|
||||
- name: dev
|
||||
jobs:
|
||||
- name: quickgui-dev-linux
|
||||
package:
|
||||
platform: linux
|
||||
target: deb
|
||||
build_args:
|
||||
flavor: dev
|
||||
target-platform: linux-x86
|
||||
dart-define:
|
||||
APP_ENV: dev
|
||||
publish_to: none
|
|
@ -0,0 +1,25 @@
|
|||
appId: com.github.quickemu-project.quickgui
|
||||
display_name: Quickgui
|
||||
icon: assets/images/logo_pink.png
|
||||
|
||||
keywords:
|
||||
- QEMU
|
||||
- quickemu
|
||||
- quickget
|
||||
- Virtual Machine
|
||||
- Hypervisor
|
||||
- macOS
|
||||
- Windows
|
||||
|
||||
generic_name: Desktop frontend for Quickget and Quickemu
|
||||
|
||||
categories:
|
||||
- System
|
||||
- Development
|
||||
- Emulator
|
||||
|
||||
startup_notify: true
|
||||
|
||||
# You can also specify [metainfo](https://freedesktop.org/software/appstream/docs/chap-Quickstart.html) file
|
||||
# which contains metadata of the app.
|
||||
# metainfo: linux/packaging/myappid.appdata.xml
|
|
@ -0,0 +1,41 @@
|
|||
display_name: Quickgui
|
||||
package_name: quickgui
|
||||
maintainer:
|
||||
name: Mark Johnson
|
||||
email: mark@barrenfrozenwasteland.com
|
||||
co_authors:
|
||||
- name: Martin Wimpress
|
||||
email: code@wimpress.io
|
||||
- name: Yannick Mauray
|
||||
email: yannick.mauray@gmail.com
|
||||
priority: optional
|
||||
section: x11
|
||||
installed_size: 16777216
|
||||
essential: false
|
||||
icon: assets/images/logo_pink.png
|
||||
dependencies:
|
||||
- zenity
|
||||
recommended_dependencies:
|
||||
- quickemu
|
||||
|
||||
keywords:
|
||||
- QEMU
|
||||
- quickemu
|
||||
- quickget
|
||||
- Virtual Machine
|
||||
- Hypervisor
|
||||
- macOS
|
||||
- Windows
|
||||
|
||||
generic_name: Desktop frontend for Quickget and Quickemu
|
||||
|
||||
categories:
|
||||
- System
|
||||
- Development
|
||||
- Emulator
|
||||
|
||||
startup_notify: true
|
||||
|
||||
# You can also specify [metainfo](https://freedesktop.org/software/appstream/docs/chap-Quickstart.html) file
|
||||
# which contains metadata of the app.
|
||||
# metainfo: linux/packaging/myappid.appdata.xml
|
|
@ -0,0 +1,32 @@
|
|||
display_name: Quickgui
|
||||
group: Application/Emulator
|
||||
vendor: Quickemu Project
|
||||
packager: Martin Wimpress
|
||||
packagerEmail: code@wimpress.io
|
||||
license: MIT
|
||||
url: https://github.com/quickemu-project/quickgui
|
||||
icon: assets/images/logo_pink.png
|
||||
requires:
|
||||
- zenity
|
||||
|
||||
keywords:
|
||||
- QEMU
|
||||
- quickemu
|
||||
- quickget
|
||||
- Virtual Machine
|
||||
- Hypervisor
|
||||
- macOS
|
||||
- Windows
|
||||
|
||||
summary: Desktop frontend for Quickget and Quickemu
|
||||
|
||||
categories:
|
||||
- System
|
||||
- Development
|
||||
- Emulator
|
||||
|
||||
startup_notify: true
|
||||
|
||||
# You can also specify [metainfo](https://freedesktop.org/software/appstream/docs/chap-Quickstart.html) file
|
||||
# which contains metadata of the app.
|
||||
# metainfo: linux/packaging/myappid.appdata.xml
|
|
@ -1,5 +1,5 @@
|
|||
name: quickgui
|
||||
description: A new Flutter project.
|
||||
description: Desktop frontend for Quickget and Quickemu
|
||||
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||
version: 1.2.8+1
|
||||
|
||||
|
@ -13,7 +13,7 @@ dependencies:
|
|||
flutter_localizations:
|
||||
sdk: flutter
|
||||
cupertino_icons: ^1.0.2
|
||||
window_size:
|
||||
window_size:
|
||||
git:
|
||||
url: https://github.com/google/flutter-desktop-embedding.git
|
||||
path: plugins/window_size
|
||||
|
@ -35,6 +35,7 @@ dependencies:
|
|||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
flutter_distributor: ^0.4.5
|
||||
flutter_lints: ^4.0.0
|
||||
|
||||
flutter:
|
||||
|
|
Loading…
Reference in New Issue