Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,20 @@ jobs:
- name: Build Linux (release)
run: flutter build linux --release

- name: Zip Linux artifact
- name: Zip Linux artifact (portable)
run: |
cd build/linux/x64/release/bundle
zip -r "${GITHUB_WORKSPACE}/Querya-Desktop-${{ steps.version.outputs.version }}-linux.zip" .

- name: Build Linux AppImage (installable)
run: ./scripts/linux/build_appimage.sh

- uses: actions/upload-artifact@v4
with:
name: bundle-linux
path: Querya-Desktop-${{ steps.version.outputs.version }}-linux.zip
path: |
Querya-Desktop-${{ steps.version.outputs.version }}-linux.zip
Querya-Desktop-${{ steps.version.outputs.version }}-linux.AppImage
if-no-files-found: error

build-macos:
Expand Down Expand Up @@ -241,10 +246,11 @@ jobs:
run: |
set -euo pipefail
mkdir -p dist
find artifacts -name '*.zip' -exec mv -t dist/ {} +
find artifacts \( -name '*.zip' -o -name '*.AppImage' \) -exec mv -t dist/ {} +
test "$(find dist -name '*.zip' | wc -l)" -eq 3
test "$(find dist -name '*.AppImage' | wc -l)" -eq 1
cd dist
sha256sum *.zip | tee SHA256SUMS.txt
sha256sum *.zip *.AppImage | tee SHA256SUMS.txt

- name: Build release notes from CHANGELOG.md
run: |
Expand All @@ -265,7 +271,7 @@ jobs:
echo "Optional USB-style profile: set \`QUERYA_PORTABLE=1\` or create a \`QueryaData/\` folder next to the binary (see docs/packaging.md)."
echo ""
echo "#### Installable"
echo "_AppImage / Windows setup / distro packages — tracked in epic #379; not attached to this release yet._"
echo "- **Linux AppImage**: \`Querya-Desktop-${VERSION}-linux.AppImage\` (\`chmod +x\` then run)"
echo ""
echo "Verify checksums: \`SHA256SUMS.txt\`"
echo ""
Expand All @@ -292,6 +298,7 @@ jobs:
fail_on_unmatched_files: true
files: |
dist/*.zip
dist/*.AppImage
dist/SHA256SUMS.txt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,7 @@ coverage/
*.exe
design-front/
docker/sqlite/data/

# Local packaging outputs
Querya-Desktop-*.AppImage
Querya-Desktop-*.zip
8 changes: 6 additions & 2 deletions docs/tags-and-releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,13 @@

Профиль по умолчанию всё равно в OS app-support; USB-style data → [packaging.md](packaging.md) (`QUERYA_PORTABLE` / `QueryaData/`).

### Installable channel (planned)
### Installable channel

Отдельные артефакты (AppImage, Windows setup, deb/rpm/Flatpak) — epic [#379](https://github.com/QueryaHub/Querya-Desktop/issues/379). Пока в Release публикуются только portable zip выше.
| Artifact | Notes |
|----------|--------|
| `Querya-Desktop-X.Y.Z-linux.AppImage` | [`scripts/linux/build_appimage.sh`](../scripts/linux/build_appimage.sh) (`chmod +x` then run) |

Windows setup / deb / rpm / Flatpak — epic [#379](https://github.com/QueryaHub/Querya-Desktop/issues/379).

## Changelog в GitHub Release

Expand Down
75 changes: 75 additions & 0 deletions scripts/linux/build_appimage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
#!/usr/bin/env bash
# Build Querya-Desktop-*.AppImage from a Flutter linux release bundle.
#
# Usage:
# ./scripts/linux/build_appimage.sh [bundle_dir] [output_appimage]
#
# Defaults:
# bundle_dir = build/linux/x64/release/bundle
# output = Querya-Desktop-<pubspec-semver>-linux.AppImage
set -euo pipefail

ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
BUNDLE="${1:-$ROOT/build/linux/x64/release/bundle}"
BINARY_NAME="querya_desktop"
ICON_SRC="$ROOT/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png"

if [[ ! -d "$BUNDLE" ]]; then
echo "error: Flutter linux bundle not found: $BUNDLE" >&2
echo "Run: flutter build linux --release" >&2
exit 1
fi
if [[ ! -x "$BUNDLE/$BINARY_NAME" ]]; then
echo "error: missing executable: $BUNDLE/$BINARY_NAME" >&2
exit 1
fi
if [[ ! -f "$ICON_SRC" ]]; then
echo "error: icon not found: $ICON_SRC" >&2
exit 1
fi

VERSION="$(grep '^version:' "$ROOT/pubspec.yaml" | sed 's/^version: //; s/+.*//')"
OUT="${2:-$ROOT/Querya-Desktop-${VERSION}-linux.AppImage}"

WORKDIR="$(mktemp -d "${TMPDIR:-/tmp}/querya-appimage.XXXXXX")"
cleanup() { rm -rf "$WORKDIR"; }
trap cleanup EXIT

APPDIR="$WORKDIR/AppDir"
mkdir -p "$APPDIR"
cp -a "$BUNDLE"/. "$APPDIR/"

cp "$ICON_SRC" "$APPDIR/${BINARY_NAME}.png"

cat > "$APPDIR/${BINARY_NAME}.desktop" <<EOF
[Desktop Entry]
Type=Application
Name=Querya Desktop
Comment=Multi-database desktop client
Exec=${BINARY_NAME}
Icon=${BINARY_NAME}
Categories=Development;Database;
Terminal=false
StartupWMClass=querya_desktop
X-AppImage-Version=${VERSION}
EOF

cat > "$APPDIR/AppRun" <<'EOF'
#!/bin/bash
set -euo pipefail
HERE="$(dirname "$(readlink -f "$0")")"
export LD_LIBRARY_PATH="${HERE}/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
cd "$HERE"
exec "$HERE/querya_desktop" "$@"
EOF
chmod +x "$APPDIR/AppRun" "$APPDIR/$BINARY_NAME"

TOOL="$WORKDIR/appimagetool"
# Prefer type-2 continuous tool; --appimage-extract-and-run avoids FUSE on CI.
curl -fsSL -o "$TOOL" \
"https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage"
chmod +x "$TOOL"

ARCH=x86_64 "$TOOL" --appimage-extract-and-run "$APPDIR" "$OUT"
chmod +x "$OUT"
echo "Wrote $OUT"
Loading