new: provide .deb & .rpm

This commit is contained in:
lollipopkit🏳️‍⚧️
2025-01-29 12:56:03 +08:00
parent e39fb23b66
commit 16948c3e0f
5 changed files with 89 additions and 7 deletions

View File

@@ -53,14 +53,31 @@ jobs:
uses: actions/checkout@v4
- name: Install Flutter
uses: subosito/flutter-action@v2
- name: Install dependencies
run: |
sudo apt update
# Basic
sudo apt install -y clang cmake ninja-build pkg-config libgtk-3-dev libvulkan-dev desktop-file-utils
# App Specific
sudo apt install -y libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libunwind-dev
# Packaging
sudo apt install -y rpm patchelf
- name: Build
run: |
dart run fl_build -p linux
dart run fl_build
dart run flutter_distributor:main release --name linux --skip-clean
- name: Rename artifacts
run: |
deb_name=$(ls dist/*/*.deb)
mv $deb_name ${{ env.APP_NAME }}_${{ env.BUILD_NUMBER }}_amd64.deb
rpm_name=$(ls dist/*/*.rpm)
mv $rpm_name ${{ env.APP_NAME }}_${{ env.BUILD_NUMBER }}_amd64.rpm
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: |
${{ env.APP_NAME }}_${{ env.BUILD_NUMBER }}_amd64.AppImage
${{ env.APP_NAME }}_${{ env.BUILD_NUMBER }}_amd64.deb
${{ env.APP_NAME }}_${{ env.BUILD_NUMBER }}_amd64.rpm
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

13
distribute_options.yaml Normal file
View File

@@ -0,0 +1,13 @@
variables:
output: dist/
releases:
- name: linux
jobs:
- name: release-linux-deb
package:
platform: linux
target: deb
- name: release-linux-rpm
package:
platform: linux
target: rpm

View File

@@ -210,12 +210,10 @@ class ServerProvider extends Provider {
Stores.setting.serverOrder.put(serverOrder.value);
Stores.server.deleteAll();
_updateTags();
bakSync.sync(milliDelay: 1000);
}
static Future<void> updateServer(
Spi old,
Spi newSpi,
) async {
static Future<void> updateServer(Spi old, Spi newSpi) async {
if (old != newSpi) {
Stores.server.update(old, newSpi);
servers[old.id]?.value.spi = newSpi;
@@ -236,7 +234,7 @@ class ServerProvider extends Provider {
}
}
_updateTags();
bakSync.sync();
bakSync.sync(milliDelay: 1000);
}
static void _setServerState(VNode<Server> s, ServerConn ss) {

View File

@@ -0,0 +1,31 @@
display_name: ServerBox
package_name: cn.lpkt.serverbox
maintainer:
name: lollipopkit
email: 10864310+lollipopkit@users.noreply.github.com
# co_authors:
# - name:
# email:
priority: optional
section: x11
installed_size: 6604
essential: false
icon: assets/app_icon.png
# postinstall_scripts:
# - echo "Installed my awesome app"
# postuninstall_scripts:
# - echo "Surprised Pickachu face"
keywords:
- server
- ssh
- sftp
- system
generic_name: ServerBox
categories:
- Utility
startup_notify: true

View File

@@ -0,0 +1,23 @@
icon: assets/app_icon.png
summary: Server status and tools to manage server.
group: Application/Utility
vendor: lollipopkit
packager: lollipopkit
packagerEmail: 10864310+lollipopkit@users.noreply.github.com
license: GPLv3
url: https://github.com/lollipopkit/flutter_server_box
display_name: ServerBox
keywords:
- server
- ssh
- sftp
- system
generic_name: ServerBox
categories:
- Utility
startup_notify: true