diff --git a/.github/workflows/flathub.yml b/.github/workflows/flathub.yml new file mode 100644 index 00000000..647627b9 --- /dev/null +++ b/.github/workflows/flathub.yml @@ -0,0 +1,44 @@ +name: Update Flathub +on: + release: + types: [published] + +permissions: + contents: read + +jobs: + update-flathub: + name: Update Flathub manifest + runs-on: ubuntu-latest + # Only run for stable releases (skip betas/pre-releases) + if: ${{ !github.event.release.prerelease }} + steps: + - name: Checkout app repo + uses: actions/checkout@v4 + + - name: Run update-manifest.sh + run: bash flatpak/update-manifest.sh "${{ github.event.release.tag_name }}" + + - name: Checkout Flathub repo + uses: actions/checkout@v4 + with: + repository: flathub/app.yaak.Yaak + token: ${{ secrets.FLATHUB_TOKEN }} + path: flathub-repo + + - name: Copy updated files to Flathub repo + run: | + cp flatpak/app.yaak.Yaak.yml flathub-repo/ + cp flatpak/app.yaak.Yaak.metainfo.xml flathub-repo/ + cp LICENSE flathub-repo/ + sed -i 's|path: \.\./LICENSE|path: LICENSE|' flathub-repo/app.yaak.Yaak.yml + + - name: Commit and push to Flathub + working-directory: flathub-repo + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add -A + git diff --cached --quiet && echo "No changes to commit" && exit 0 + git commit -m "Update to ${{ github.event.release.tag_name }}" + git push diff --git a/.gitignore b/.gitignore index e8922cf5..a8773a8a 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,7 @@ crates-tauri/yaak-app/tauri.worktree.conf.json # Tauri auto-generated permission files **/permissions/autogenerated **/permissions/schemas + +# Flatpak build artifacts +flatpak-repo/ +.flatpak-builder/ diff --git a/flatpak/app.yaak.Yaak.metainfo.xml b/flatpak/app.yaak.Yaak.metainfo.xml new file mode 100644 index 00000000..6fd4120d --- /dev/null +++ b/flatpak/app.yaak.Yaak.metainfo.xml @@ -0,0 +1,57 @@ + + + app.yaak.Yaak + + Yaak + An offline, Git friendly API Client + + + Yaak + + + MIT + MIT + + https://yaak.app + https://yaak.app/feedback + https://yaak.app/feedback + https://github.com/mountain-loop/yaak + + +

+ A fast, privacy-first API client for REST, GraphQL, SSE, WebSocket, + and gRPC — built with Tauri, Rust, and React. +

+

Features include:

+ +
+ + app.yaak.Yaak.desktop + + + #8b32ff + #c293ff + + + + + + + Crafting an API request + https://assets.yaak.app/uploads/screenshot-BLG1w_2310x1326.png + + + + + + +
diff --git a/flatpak/app.yaak.Yaak.yml b/flatpak/app.yaak.Yaak.yml new file mode 100644 index 00000000..e0713721 --- /dev/null +++ b/flatpak/app.yaak.Yaak.yml @@ -0,0 +1,64 @@ +id: app.yaak.Yaak +runtime: org.gnome.Platform +runtime-version: "48" +sdk: org.gnome.Sdk +command: yaak-app +rename-desktop-file: yaak.desktop +rename-icon: yaak-app + +finish-args: + - --socket=wayland + - --socket=fallback-x11 + - --share=ipc + - --device=dri + - --share=network + - --socket=pulseaudio # Preview audio responses + - --socket=ssh-auth # Git SSH remotes + - --socket=gpg-agent # Git commit signing + - --talk-name=org.freedesktop.secrets # Keyring for encryption + - --filesystem=home # Git repos, ~/.gitconfig, ~/.ssh, etc + +modules: + - name: git + cleanup: + - /share + make-args: + - NO_PERL=1 + - NO_TCLTK=1 + make-install-args: + - INSTALL_SYMLINKS=1 + - NO_PERL=1 + - NO_TCLTK=1 + sources: + - type: archive + url: https://www.kernel.org/pub/software/scm/git/git-2.48.1.tar.gz + sha256: 51b4d03b1e311ba673591210f94f24a4c5781453e1eb188822e3d9cdc04c2212 + + - name: yaak + buildsystem: simple + build-commands: + - ar -x yaak.deb + - tar -xf data.tar.gz + - mv usr/bin/* /app/bin + - mv usr/lib/* /app/lib + - mv usr/share/* /app/share + - install -Dm644 app.yaak.Yaak.metainfo.xml /app/share/metainfo/app.yaak.Yaak.metainfo.xml + - install -Dm644 LICENSE /app/share/licenses/app.yaak.Yaak/LICENSE + + sources: + - type: file + dest-filename: yaak.deb + url: https://github.com/mountain-loop/yaak/releases/download/v2026.1.2/yaak_2026.1.2_amd64.deb + sha256: "c4236b5bcf391e579dc79b71c3b5c58f6f9bfc6c175fc70426d0ca85799beba5" + only-arches: + - x86_64 + - type: file + dest-filename: yaak.deb + url: https://github.com/mountain-loop/yaak/releases/download/v2026.1.2/yaak_2026.1.2_arm64.deb + sha256: "9ba9b7c9df56ffb9b801e40cb38685f1650cf7e2f9e85dad0ae3329f8e01ff6d" + only-arches: + - aarch64 + - type: file + path: app.yaak.Yaak.metainfo.xml + - type: file + path: ../LICENSE diff --git a/flatpak/update-manifest.sh b/flatpak/update-manifest.sh new file mode 100755 index 00000000..e75c6186 --- /dev/null +++ b/flatpak/update-manifest.sh @@ -0,0 +1,82 @@ +#!/usr/bin/env bash +# +# Update the Flatpak manifest with URLs and SHA256 hashes for a given release. +# +# Usage: +# ./flatpak/update-manifest.sh v2026.2.0 +# +# This script: +# 1. Downloads the x86_64 and aarch64 .deb files from the GitHub release +# 2. Computes their SHA256 checksums +# 3. Updates the manifest YAML with the correct URLs and hashes +# 4. Updates the metainfo.xml with a new entry + +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +MANIFEST="$SCRIPT_DIR/app.yaak.Yaak.yml" +METAINFO="$SCRIPT_DIR/app.yaak.Yaak.metainfo.xml" + +if [ $# -lt 1 ]; then + echo "Usage: $0 " + echo "Example: $0 v2026.2.0" + exit 1 +fi + +VERSION_TAG="$1" +VERSION="${VERSION_TAG#v}" + +# Only allow stable releases (skip beta, alpha, rc, etc.) +if [[ "$VERSION" == *-* ]]; then + echo "Skipping pre-release version '$VERSION_TAG' (only stable releases are published to Flathub)" + exit 0 +fi + +REPO="mountain-loop/yaak" +BASE_URL="https://github.com/$REPO/releases/download/$VERSION_TAG" + +DEB_AMD64="yaak_${VERSION}_amd64.deb" +DEB_ARM64="yaak_${VERSION}_arm64.deb" + +TMPDIR=$(mktemp -d) +trap 'rm -rf "$TMPDIR"' EXIT + +echo "Downloading $DEB_AMD64..." +curl -fSL "$BASE_URL/$DEB_AMD64" -o "$TMPDIR/$DEB_AMD64" +SHA_AMD64=$(sha256sum "$TMPDIR/$DEB_AMD64" | cut -d' ' -f1) +echo " SHA256: $SHA_AMD64" + +echo "Downloading $DEB_ARM64..." +curl -fSL "$BASE_URL/$DEB_ARM64" -o "$TMPDIR/$DEB_ARM64" +SHA_ARM64=$(sha256sum "$TMPDIR/$DEB_ARM64" | cut -d' ' -f1) +echo " SHA256: $SHA_ARM64" + +echo "" +echo "Updating manifest: $MANIFEST" + +# Update URLs by matching the arch-specific deb filename +sed -i "s|url: .*amd64\.deb|url: $BASE_URL/$DEB_AMD64|" "$MANIFEST" +sed -i "s|url: .*arm64\.deb|url: $BASE_URL/$DEB_ARM64|" "$MANIFEST" + +# Update SHA256 hashes by finding the current ones and replacing +OLD_SHA_AMD64=$(grep -A2 "amd64\.deb" "$MANIFEST" | grep sha256 | sed 's/.*"\(.*\)"/\1/') +OLD_SHA_ARM64=$(grep -A2 "arm64\.deb" "$MANIFEST" | grep sha256 | sed 's/.*"\(.*\)"/\1/') + +sed -i "s|$OLD_SHA_AMD64|$SHA_AMD64|" "$MANIFEST" +sed -i "s|$OLD_SHA_ARM64|$SHA_ARM64|" "$MANIFEST" + +echo " Manifest updated." + +echo "Updating metainfo: $METAINFO" + +TODAY=$(date +%Y-%m-%d) + +# Insert new release entry after +sed -i "s| | \n |" "$METAINFO" + +echo " Metainfo updated." + +echo "" +echo "Done! Review the changes:" +echo " $MANIFEST" +echo " $METAINFO"