From 526e8a38c77376d07196519caeb7b9e6df5bec77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Sat, 8 Nov 2025 16:02:32 +0100 Subject: [PATCH 1/5] fix(flatpak): remove unused net.unstoppableswap.gui.json This is the same as o.e.a.json just with a different id, is unused, and was clearly supposed to be a rename, not a copy, in the referenced commit Fixes: 517a4fa574b0b6b87df0833fc5d488867b8d57ae --- flatpak/net.unstoppableswap.gui.json | 36 ---------------------------- 1 file changed, 36 deletions(-) delete mode 100644 flatpak/net.unstoppableswap.gui.json diff --git a/flatpak/net.unstoppableswap.gui.json b/flatpak/net.unstoppableswap.gui.json deleted file mode 100644 index faf916ca7..000000000 --- a/flatpak/net.unstoppableswap.gui.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "id": "net.unstoppableswap.gui", - "runtime": "org.gnome.Platform", - "runtime-version": "47", - "sdk": "org.gnome.Sdk", - "command": "unstoppableswap-gui-rs", - "finish-args": [ - "--socket=wayland", - "--socket=fallback-x11", - "--device=dri", - "--share=ipc", - "--share=network", - "--talk-name=org.kde.StatusNotifierWatcher", - "--filesystem=xdg-run/tray-icon:create", - "--filesystem=~/.local/share/xmr-btc-swap" - ], - "modules": [ - { - "name": "binary", - "buildsystem": "simple", - "sources": [ - { - "type": "file", - "url": "https://cdn.crabnebula.app/download/unstoppableswap/unstoppableswap-gui-rs/latest/platform/debian-x86_64", - "sha256": "f1fdb9dc164ed45e31fbba7209da23fa4cb1d461442c9dd0b6bc763b8bf1bb59", - "only-arches": ["x86_64"] - } - ], - "build-commands": [ - "ar -x *.deb", - "tar -xf data.tar.gz", - "install -Dm755 usr/bin/unstoppableswap-gui-rs /app/bin/unstoppableswap-gui-rs" - ] - } - ] -} From c5aa592d7a5cd6c6191e5258042349cd1f5fbb22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Sat, 8 Nov 2025 15:51:08 +0100 Subject: [PATCH 2/5] refactor(CI): clean up build-gui-release-binaries.yml --- .../workflows/build-gui-release-binaries.yml | 20 +++++++------------ 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-gui-release-binaries.yml b/.github/workflows/build-gui-release-binaries.yml index b80c4d3b0..7f4c08020 100644 --- a/.github/workflows/build-gui-release-binaries.yml +++ b/.github/workflows/build-gui-release-binaries.yml @@ -101,8 +101,7 @@ jobs: exit 1 fi - export GNUPGHOME="$(mktemp -d)" - chmod 700 "$GNUPGHOME" + export GNUPGHOME="$(umask 077; mktemp -d)" # Allow loopback pinentry when passphrase is provided echo "allow-loopback-pinentry" >> "$GNUPGHOME/gpg-agent.conf" @@ -152,9 +151,6 @@ jobs: # Find all .asc signature files we just created find target/${{ matrix.target }}/release/bundle -type f -name "*.asc" -print0 | while IFS= read -r -d '' sig_file; do echo "Uploading signature: $sig_file" - # Get just the filename for the asset name - asset_name=$(basename "$sig_file") - gh release upload "${{ github.event.release.tag_name }}" \ "$sig_file" \ --clobber @@ -186,8 +182,8 @@ jobs: gh release download "$VERSION" --pattern "*.dmg" --dir /tmp/dmgs # Calculate SHA256 checksums - AARCH64_DMG=$(ls /tmp/dmgs/*_aarch64_darwin.dmg) - X64_DMG=$(ls /tmp/dmgs/*_x64_darwin.dmg) + AARCH64_DMG=/tmp/dmgs/*_aarch64_darwin.dmg + X64_DMG=/tmp/dmgs/*_x64_darwin.dmg AARCH64_SHA256=$(sha256sum "$AARCH64_DMG" | awk '{print $1}') X64_SHA256=$(sha256sum "$X64_DMG" | awk '{print $1}') @@ -196,12 +192,10 @@ jobs: echo "x64 SHA256: $X64_SHA256" # Generate the Homebrew formula from template - cp dev-scripts/homebrew/eigenwallet.rb.template eigenwallet.rb - sed -i "s/VERSION_PLACEHOLDER/$VERSION/g" eigenwallet.rb - sed -i "s/AARCH64_SHA256_PLACEHOLDER/$AARCH64_SHA256/g" eigenwallet.rb - sed -i "s/X64_SHA256_PLACEHOLDER/$X64_SHA256/g" eigenwallet.rb - - cat eigenwallet.rb + sed -e "s/VERSION_PLACEHOLDER/$VERSION/g" \ + -e "s/AARCH64_SHA256_PLACEHOLDER/$AARCH64_SHA256/g" \ + -e "s/X64_SHA256_PLACEHOLDER/$X64_SHA256/g" \ + dev-scripts/homebrew/eigenwallet.rb.template | tee eigenwallet.rb - name: Upload Homebrew formula to release env: From 385cddb3b7c04c1ffcbb4171f0c4460c48aee5cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Sat, 8 Nov 2025 15:59:30 +0100 Subject: [PATCH 3/5] refactor(publish_flatpak): deslopify. NFC --- dev-scripts/publish_flatpak.sh | 135 +++++++++------------------------ 1 file changed, 37 insertions(+), 98 deletions(-) diff --git a/dev-scripts/publish_flatpak.sh b/dev-scripts/publish_flatpak.sh index 0437ea062..84ec27971 100755 --- a/dev-scripts/publish_flatpak.sh +++ b/dev-scripts/publish_flatpak.sh @@ -11,7 +11,6 @@ BRANCH="gh-pages" GPG_SIGN="" NO_GPG_FLAG="" REPO_DIR="flatpak-repo" -TEMP_DIR="$(mktemp -d)" # Parse arguments while [[ $# -gt 0 ]]; do @@ -39,13 +38,11 @@ done # Function to list available GPG keys list_gpg_keys() { echo "๐Ÿ“‹ Available GPG keys:" - gpg --list-secret-keys --keyid-format=long 2>/dev/null | grep -E "^(sec|uid)" | while IFS= read -r line; do - if [[ $line =~ ^sec ]]; then - key_info=$(echo "$line" | awk '{print $2}') + gpg --list-secret-keys --keyid-format=long 2>/dev/null | while read -r type key_info name; do + if [[ $type = sec ]]; then echo " ๐Ÿ”‘ Key: $key_info" - elif [[ $line =~ ^uid ]]; then - uid=$(echo "$line" | sed 's/uid[[:space:]]*\[[^]]*\][[:space:]]*//') - echo " ๐Ÿ‘ค $uid" + elif [[ $type = uid ]]; then + echo " ๐Ÿ‘ค $name" echo "" fi done @@ -58,7 +55,7 @@ select_gpg_key() { exit 1 fi - local keys=($(gpg --list-secret-keys --keyid-format=long 2>/dev/null | grep "^sec" | awk '{print $2}' | cut -d'/' -f2)) + local keys=($(gpg --list-secret-keys --keyid-format=long 2>/dev/null | awk -F "[$IFS/]*" '/^sec/ {print $3}')) if [ ${#keys[@]} -eq 0 ]; then echo "๐Ÿ”‘ No GPG keys found." @@ -70,7 +67,6 @@ select_gpg_key() { select_gpg_key else echo "โš ๏ธ Proceeding without GPG signing (not recommended for production)" - GPG_SIGN="" return fi else @@ -80,7 +76,7 @@ select_gpg_key() { echo "Please select a GPG key for signing:" for i in "${!keys[@]}"; do local key_id="${keys[i]}" - local user_info=$(gpg --list-secret-keys --keyid-format=long "$key_id" 2>/dev/null | grep "^uid" | head -1 | sed 's/uid[[:space:]]*\[[^]]*\][[:space:]]*//') + local user_info=$(gpg --list-secret-keys --keyid-format=long "$key_id" 2>/dev/null | awk '/^uid/ {$1=""; $2="\b"; print; exit}') echo " $((i+1))) ${key_id} - ${user_info}" done echo " $((${#keys[@]}+1))) Skip GPG signing" @@ -93,7 +89,6 @@ select_gpg_key() { if [[ $choice =~ ^[0-9]+$ ]] && [ $choice -ge 1 ] && [ $choice -le $((${#keys[@]}+2)) ]; then if [ $choice -eq $((${#keys[@]}+1)) ]; then echo "โš ๏ธ Proceeding without GPG signing" - GPG_SIGN="" break elif [ $choice -eq $((${#keys[@]}+2)) ]; then import_gpg_key @@ -101,7 +96,7 @@ select_gpg_key() { break else GPG_SIGN="${keys[$((choice-1))]}" - local selected_user=$(gpg --list-secret-keys --keyid-format=long "$GPG_SIGN" 2>/dev/null | grep "^uid" | head -1 | sed 's/uid[[:space:]]*\[[^]]*\][[:space:]]*//') + local selected_user=$(gpg --list-secret-keys --keyid-format=long "$GPG_SIGN" 2>/dev/null | awk '/^uid/ {$1=""; $2="\b"; print; exit}') echo "โœ… Selected key: $GPG_SIGN - $selected_user" break fi @@ -122,28 +117,19 @@ import_gpg_key() { echo " Press Ctrl+D when finished:" echo "" - local temp_key_file=$(mktemp) - cat > "$temp_key_file" - - echo "" - echo "๐Ÿ”„ Importing key..." - - if gpg --import "$temp_key_file" 2>/dev/null; then + if gpg --import - 2>/dev/null; then echo "โœ… GPG key imported successfully!" else echo "โŒ Failed to import GPG key. Please check the format and try again." - rm -f "$temp_key_file" exit 1 fi - - rm -f "$temp_key_file" } # Check requirements if ! command -v flatpak-builder &> /dev/null; then echo "โŒ flatpak-builder is required but not installed" echo "Install with: sudo apt install flatpak-builder (Ubuntu/Debian)" - echo " sudo dnf install flatpak-builder (Fedora)" + echo " sudo dnf install flatpak-builder (Fedora)" exit 1 fi @@ -155,12 +141,12 @@ fi if ! command -v jq &> /dev/null; then echo "โŒ jq is required but not installed" echo "Install with: sudo apt install jq (Ubuntu/Debian)" - echo " sudo dnf install jq (Fedora)" + echo " sudo dnf install jq (Fedora)" exit 1 fi # Get repository info -REPO_URL=$(git remote get-url origin 2>/dev/null || echo "") +REPO_URL=$(git remote get-url origin 2>/dev/null || :) if [[ $REPO_URL =~ github\.com[:/]([^/]+)/([^/.]+) ]]; then GITHUB_USER="${BASH_REMATCH[1]}" REPO_NAME="${BASH_REMATCH[2]}" @@ -203,12 +189,13 @@ echo "" # Always use local .deb file - build if needed echo "๐Ÿ” Ensuring local .deb file exists..." MANIFEST_FILE="flatpak/org.eigenwallet.app.json" -TEMP_MANIFEST="" +trap 'rm -f "$TEMP_MANIFEST"' EXIT INT +TEMP_MANIFEST=$(mktemp --suffix=.json) # Look for the .deb file in the expected location -DEB_FILE=$(find ./target/release/bundle/deb/ -name "*.deb" -not -name "*.deb.sig" 2>/dev/null | head -1) +DEB_FILE=$(find "$PWD/target/debug/bundle/deb/" -name "*.deb" -print -quit) -if [ -n "$DEB_FILE" ] && [ -f "$DEB_FILE" ]; then +if [ -f "$DEB_FILE" ]; then echo "โœ… Found local .deb file: $DEB_FILE" else echo "๐Ÿ—๏ธ No local .deb file found, building locally..." @@ -219,7 +206,7 @@ else fi # Extract version from Cargo.toml - VERSION=$(grep '^version = ' Cargo.toml | head -1 | sed 's/.*= "//' | sed 's/".*//') + VERSION=$(awk -F "[$IFS\"]*" '/^version/ { print $3; exit; }' Cargo.toml) if [ -z "$VERSION" ]; then echo "โŒ Could not determine version from Cargo.toml" exit 1 @@ -229,8 +216,8 @@ else ./release-build.sh "$VERSION" # Look for the .deb file again - DEB_FILE=$(find ./target/release/bundle/deb/ -name "*.deb" -not -name "*.deb.sig" 2>/dev/null | head -1) - if [ -z "$DEB_FILE" ] || [ ! -f "$DEB_FILE" ]; then + DEB_FILE=$(find "$PWD/target/debug/bundle/deb/" -name "*.deb" -print -quit) + if ! [ -f "$DEB_FILE" ]; then echo "โŒ Failed to build .deb file" exit 1 fi @@ -238,39 +225,26 @@ else echo "โœ… Local build completed: $DEB_FILE" fi -# Get the absolute path -DEB_ABSOLUTE_PATH=$(realpath "$DEB_FILE") - # Calculate SHA256 hash of the .deb file echo "๐Ÿ”ข Calculating SHA256 hash..." -DEB_SHA256=$(sha256sum "$DEB_ABSOLUTE_PATH" | cut -d' ' -f1) +read -r DEB_SHA256 _ < <(sha256sum "$DEB_FILE") echo " Hash: $DEB_SHA256" -# Create a temporary manifest with the local file -TEMP_MANIFEST=$(mktemp --suffix=.json) - echo "๐Ÿ“ Creating manifest with local .deb..." # Modify the manifest to use the local file -jq --arg deb_path "file://$DEB_ABSOLUTE_PATH" --arg deb_hash "$DEB_SHA256" ' +jq --arg deb_path "file://$DEB_FILE" --arg deb_hash "$DEB_SHA256" ' .modules[0].sources = [ { "type": "file", "url": $deb_path, - "sha256": $deb_hash, - "dest": ".", - "dest-filename": "eigenwallet.deb" + "sha256": $deb_hash } - ] | - .modules[0]."build-commands" = [ - "ar -x eigenwallet.deb", - "tar -xf data.tar.gz", - "install -Dm755 usr/bin/unstoppableswap-gui-rs /app/bin/unstoppableswap-gui-rs" ] ' "$MANIFEST_FILE" > "$TEMP_MANIFEST" MANIFEST_FILE="$TEMP_MANIFEST" -echo "๐Ÿ“ฆ Using local build: $(basename "$DEB_FILE")" +echo "๐Ÿ“ฆ Using local build: ${DEB_FILE##*/}" echo "" @@ -332,13 +306,6 @@ Icon=${PAGES_URL}/icon.png SuggestRemoteName=eigenwallet EOF -# Add GPG key if signing -if [ -n "$GPG_SIGN" ]; then - echo "๐Ÿ”‘ Adding GPG key to .flatpakrepo..." - GPG_KEY_B64=$(gpg --export "$GPG_SIGN" | base64 -w 0) - echo "GPGKey=$GPG_KEY_B64" >> "$REPO_DIR/eigenwallet.flatpakrepo" -fi - # Generate .flatpakref file echo "๐Ÿ“ Generating .flatpakref file..." cat > "$REPO_DIR/org.eigenwallet.app.flatpakref" << EOF @@ -356,21 +323,19 @@ EOF # Add GPG key if signing if [ -n "$GPG_SIGN" ]; then - GPG_KEY_B64=$(gpg --export "$GPG_SIGN" | base64 -w 0) - echo "GPGKey=$GPG_KEY_B64" >> "$REPO_DIR/org.eigenwallet.app.flatpakref" + echo "๐Ÿ”‘ Adding GPG key to .flatpakrepo and .flatpakref..." + { + printf "GPGKey=" + gpg --export "$GPG_SIGN" | base64 -w 0 + echo + } | tee -a "$REPO_DIR/eigenwallet.flatpakrepo" "$REPO_DIR/org.eigenwallet.app.flatpakref" fi # Copy bundle to repo directory cp org.eigenwallet.app.flatpak "$REPO_DIR/" # Use index.html from flatpak directory -if [ -f "flatpak/index.html" ]; then - echo "Copying index.html from flatpak directory..." - cp flatpak/index.html "$REPO_DIR/index.html" -else - echo "Error: flatpak/index.html not found" - exit 1 -fi +cp -v flatpak/index.html "$REPO_DIR/" # Copy any additional files if [ -f "icon.png" ]; then @@ -382,44 +347,27 @@ if [ -f "README.md" ]; then fi # Add .nojekyll file to skip Jekyll processing -touch "$REPO_DIR/.nojekyll" +>> "$REPO_DIR/.nojekyll" echo "โœ… Flatpak repository built successfully!" -echo "๐Ÿ“Š Repository size: $(du -sh $REPO_DIR | cut -f1)" +echo "๐Ÿ“Š Repository size: $(du -sh "$REPO_DIR" | { read -r s _; echo "$s"; })" echo "๐Ÿ“ Repository files are in: $REPO_DIR/" if [ "$PUSH_FLAG" = "--push" ]; then echo "" echo "๐Ÿš€ Deploying to GitHub Pages..." - # Store current branch - CURRENT_BRANCH=$(git branch --show-current) - - # Create a temporary directory for deployment - DEPLOY_DIR=$(mktemp -d) - - # Copy flatpak repo to deploy directory (including hidden files) - echo "๐Ÿ“ Preparing deployment files..." - cp -r "$REPO_DIR"/. "$DEPLOY_DIR/" - # Initialize fresh git repo in deploy directory - cd "$DEPLOY_DIR" - git init - git add . - git commit -m "Update Flatpak repository $(date -u '+%Y-%m-%d %H:%M:%S UTC')" - - # Go back to original directory - cd - > /dev/null + git -C "$REPO_DIR" init + git -C "$REPO_DIR" add . + git -C "$REPO_DIR" commit -m "Update Flatpak repository $(date -u '+%F %T %Z')" # Push to GitHub Pages branch echo "๐Ÿš€ Force pushing to $BRANCH..." - cd "$DEPLOY_DIR" - git remote add origin "$(cd - > /dev/null && git remote get-url origin)" - git push --force origin HEAD:"$BRANCH" + git -C "$REPO_DIR" push --force "$REPO_URL" HEAD:"$BRANCH" - # Return to original directory and clean up - cd - > /dev/null - rm -rf "$DEPLOY_DIR" + # Clean up + rm -rf "$REPO_DIR/.git" echo "๐ŸŽ‰ Deployed successfully!" echo "๐ŸŒ Your Flatpak repository is available at: $PAGES_URL" @@ -438,12 +386,3 @@ else echo "" echo "๐Ÿ“‹ Or manually copy the contents of $REPO_DIR/ to your gh-pages branch" fi - -# Cleanup temporary manifest if created -if [ -n "$TEMP_MANIFEST" ] && [ -f "$TEMP_MANIFEST" ]; then - rm -f "$TEMP_MANIFEST" -fi - -# Cleanup -rm -rf "$TEMP_DIR" -echo "๐Ÿงน Cleanup completed" \ No newline at end of file From 0479565dad0f91e123e684f832ed152ae31cfe18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Sat, 8 Nov 2025 16:00:55 +0100 Subject: [PATCH 4/5] refactor(publish_flatpak): lift out .flatpakrepo & .flatpakref Common bits at the top for convenience --- dev-scripts/publish_flatpak.sh | 47 ++++++-------------------- flatpak/eigenwallet.flatpakrepo | 11 ++++++ flatpak/org.eigenwallet.app.flatpakref | 12 +++++++ 3 files changed, 34 insertions(+), 36 deletions(-) create mode 100644 flatpak/eigenwallet.flatpakrepo create mode 100644 flatpak/org.eigenwallet.app.flatpakref diff --git a/dev-scripts/publish_flatpak.sh b/dev-scripts/publish_flatpak.sh index 84ec27971..963f14d2c 100755 --- a/dev-scripts/publish_flatpak.sh +++ b/dev-scripts/publish_flatpak.sh @@ -292,45 +292,20 @@ if [ -n "$GPG_SIGN" ]; then fi flatpak build-bundle "${BUNDLE_ARGS[@]}" org.eigenwallet.app -# Generate .flatpakrepo file -echo "๐Ÿ“ Generating .flatpakrepo file..." -cat > "$REPO_DIR/eigenwallet.flatpakrepo" << EOF -[Flatpak Repo] -Title=eigenwallet -Name=eigenwallet -Url=${PAGES_URL}/ -Homepage=https://github.com/${GITHUB_USER}/${REPO_NAME} -Comment=Unstoppable cross-chain atomic swaps -Description=Repository for eigenwallet applications - providing secure and decentralized XMR-BTC atomic swaps -Icon=${PAGES_URL}/icon.png -SuggestRemoteName=eigenwallet -EOF - -# Generate .flatpakref file -echo "๐Ÿ“ Generating .flatpakref file..." -cat > "$REPO_DIR/org.eigenwallet.app.flatpakref" << EOF -[Flatpak Ref] -Title=eigenwallet GUI -Name=org.eigenwallet.app -Branch=stable -Url=${PAGES_URL}/ -SuggestRemoteName=eigenwallet -Homepage=https://github.com/${GITHUB_USER}/${REPO_NAME} -Icon=${PAGES_URL}/icon.png -RuntimeRepo=https://dl.flathub.org/repo/flathub.flatpakrepo -IsRuntime=false -EOF - -# Add GPG key if signing +# Add GPG key only if signing if [ -n "$GPG_SIGN" ]; then - echo "๐Ÿ”‘ Adding GPG key to .flatpakrepo and .flatpakref..." - { - printf "GPGKey=" - gpg --export "$GPG_SIGN" | base64 -w 0 - echo - } | tee -a "$REPO_DIR/eigenwallet.flatpakrepo" "$REPO_DIR/org.eigenwallet.app.flatpakref" + echo "๐Ÿ”‘ Adding GPG keys to .flatpakrepo and .flatpakref..." + GPGKey="s|%GPGKey%|$(gpg --export "$GPG_SIGN" | base64 -w 0)|" +else + GPGKey="/%GPGKey%/d" fi +cp -v flatpak/*.flatpakre* "$REPO_DIR/" +sed -e "s|%Url%|${PAGES_URL}|" \ + -e "s|%Homepage%|https://github.com/${GITHUB_USER}/${REPO_NAME}|" \ + -e "$GPGKey" \ + -i "$REPO_DIR"/*.flatpakre* + # Copy bundle to repo directory cp org.eigenwallet.app.flatpak "$REPO_DIR/" diff --git a/flatpak/eigenwallet.flatpakrepo b/flatpak/eigenwallet.flatpakrepo new file mode 100644 index 000000000..e608fa047 --- /dev/null +++ b/flatpak/eigenwallet.flatpakrepo @@ -0,0 +1,11 @@ +[Flatpak Repo] +Url=%Url% +Icon=%Url%/icon.png +SuggestRemoteName=eigenwallet +Homepage=%Homepage% +GPGKey=%GPGKey% + +Title=eigenwallet +Name=eigenwallet +Comment=Unstoppable cross-chain atomic swaps +Description=Repository for eigenwallet applications - providing secure and decentralized XMR-BTC atomic swaps diff --git a/flatpak/org.eigenwallet.app.flatpakref b/flatpak/org.eigenwallet.app.flatpakref new file mode 100644 index 000000000..0a45e48e8 --- /dev/null +++ b/flatpak/org.eigenwallet.app.flatpakref @@ -0,0 +1,12 @@ +[Flatpak Ref] +Url=%Url% +Icon=%Url%/icon.png +SuggestRemoteName=eigenwallet +Homepage=%Homepage% +GPGKey=%GPGKey% + +Title=eigenwallet GUI +Name=org.eigenwallet.app +Branch=stable +RuntimeRepo=https://dl.flathub.org/repo/flathub.flatpakrepo +IsRuntime=false From 84ccb518c857a8c736216091c2b68de47c784362 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Sat, 8 Nov 2025 16:03:37 +0100 Subject: [PATCH 5/5] feat(CI): build + upload flatpak to gh-pages in build-gui-release-binaries.yml This is equivalent to the current flatpak releases except it also has the icon --- .github/actions/set-monero-env/action.yml | 2 +- .../workflows/build-gui-release-binaries.yml | 43 ++++++++++++++++++- 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/.github/actions/set-monero-env/action.yml b/.github/actions/set-monero-env/action.yml index 1ef2d068c..b1d6735bf 100644 --- a/.github/actions/set-monero-env/action.yml +++ b/.github/actions/set-monero-env/action.yml @@ -9,7 +9,7 @@ runs: # GUI-specific Ubuntu dependencies grep -q noble /etc/os-release && pin==2.44.0-2 || pin= - echo "DEPS_GUI_UBUNTU_SPECIFIC=libgtk-3-dev libappindicator3-dev librsvg2-dev" {libwebkit2gtk-4.1-0,libwebkit2gtk-4.1-dev,libjavascriptcoregtk-4.1-0,libjavascriptcoregtk-4.1-dev,gir1.2-javascriptcoregtk-4.1,gir1.2-webkit2-4.1}"$pin" >> $GITHUB_ENV + echo "DEPS_GUI_UBUNTU_SPECIFIC=flatpak-builder jq libgtk-3-dev libappindicator3-dev librsvg2-dev" {libwebkit2gtk-4.1-0,libwebkit2gtk-4.1-dev,libjavascriptcoregtk-4.1-0,libjavascriptcoregtk-4.1-dev,gir1.2-javascriptcoregtk-4.1,gir1.2-webkit2-4.1}"$pin" >> $GITHUB_ENV # Build tooling (Linux) echo "DEPS_BUILD_LINUX=autoconf nsis mingw-w64 build-essential pkg-config libtool ccache make cmake gcc g++ git curl lbzip2 gperf g++-mingw-w64-x86-64" >> $GITHUB_ENV diff --git a/.github/workflows/build-gui-release-binaries.yml b/.github/workflows/build-gui-release-binaries.yml index 7f4c08020..3b2509c4f 100644 --- a/.github/workflows/build-gui-release-binaries.yml +++ b/.github/workflows/build-gui-release-binaries.yml @@ -156,7 +156,48 @@ jobs: --clobber done - - name: upload to crabnebula release (not for previews) + - name: Upload flatpak release + if: ${{ github.event_name != 'pull_request' && !contains(github.ref_name, 'preview') && matrix.target == 'x86_64-unknown-linux-gnu' }} + shell: bash + run: | + set -euxo pipefail + + deb=$(find "$PWD" -name *.deb -print -quit) + read -r sum _ < <(sha256sum "$deb") + jq --arg deb_url "file://$deb" --arg deb_sha256 "$sum" ' + .modules[0].sources = [ + { + "type": "file", + "url": $deb_url, + "sha256": $deb_sha256 + } + ] + ' < flatpak/org.eigenwallet.app.json > target/manifest.json + + outdir=target/flatpak-repo + flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo + flatpak-builder build-dir --gpg-sign="$GPG_FPR" --user --install-deps-from=flathub --disable-rofiles-fuse --disable-updates --repo="$outdir" target/manifest.json + flatpak build-update-repo --gpg-sign="$GPG_FPR" --generate-static-deltas --prune "$outdir" + flatpak build-bundle --gpg-sign="$GPG_FPR" "$outdir" "$outdir/org.eigenwallet.app.flatpak" org.eigenwallet.app + + ln flatpak/index.html flatpak/*.flatpakre* src-tauri/icons/icon.png README.md "$outdir/" + > "$outdir/.nojekyll" + + IFS=/ read -r user repo <<< "$GITHUB_REPOSITORY" + sed -e "s|%Url%|https://$user.github.io/$repo|" \ + -e "s|%Homepage%|https://github.com/$GITHUB_REPOSITORY|" \ + -e "s|%GPGKey%|$(gpg --export "$GPG_FPR" | base64 -w0)|" \ + -i "$outdir"/*.flatpakre* + + git -C "$outdir" init + git -C "$outdir" add . + git -C "$outdir" config user.name "${{ secrets.BOTTY_NAME }}" + git -C "$outdir" config user.email ${{ secrets.BOTTY_EMAIL }} + git -C "$outdir" commit -m "Build Flatpak repository from $GITHUB_REF_NAME ($GITHUB_SHA)" + git fetch -f "$outdir" HEAD:gh-pages + git push -f origin gh-pages + + - name: Upload to crabnebula release (not for previews) if: ${{ github.event_name != 'pull_request' && !contains(github.ref_name, 'preview') }} uses: crabnebula-dev/cloud-release@v0 with: