This commit is contained in:
einliterflasche 2025-11-10 16:45:05 +01:00
commit 10a039a22e
No known key found for this signature in database
GPG key ID: 90676A9B07184BC9
5 changed files with 41 additions and 24 deletions

View file

@ -163,22 +163,19 @@ jobs:
set -euxo pipefail set -euxo pipefail
deb=$(find "$PWD" -name *.deb -print -quit) deb=$(find "$PWD" -name *.deb -print -quit)
read -r sum _ < <(sha256sum "$deb") jq --arg deb_path "$deb" --arg PWD "$PWD" '
jq --arg deb_url "file://$deb" --arg deb_sha256 "$sum" ' .modules[0].sources = {
.modules[0].sources = [ "type": "file",
{ "path": $deb_path
"type": "file", } |
"url": $deb_url, .modules[0].sources[1].path = $PWD + "/" + .modules[0].sources[1].path
"sha256": $deb_sha256
}
]
' < flatpak/org.eigenwallet.app.json > target/manifest.json ' < flatpak/org.eigenwallet.app.json > target/manifest.json
outdir=target/flatpak-repo outdir=target/flatpak-repo
flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo 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-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-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 flatpak build-bundle --gpg-sign="$GPG_FPR" "$outdir" "$outdir/org.eigenwallet.app.flatpak" org.eigenwallet.app stable
ln flatpak/index.html flatpak/*.flatpakre* src-tauri/icons/icon.png README.md "$outdir/" ln flatpak/index.html flatpak/*.flatpakre* src-tauri/icons/icon.png README.md "$outdir/"
> "$outdir/.nojekyll" > "$outdir/.nojekyll"

View file

@ -62,6 +62,11 @@ jobs:
run: | run: |
sed -i 's/"version": "[^"]*"/"version": "${{ github.event.inputs.version }}"/' src-tauri/tauri.conf.json sed -i 's/"version": "[^"]*"/"version": "${{ github.event.inputs.version }}"/' src-tauri/tauri.conf.json
- name: Update version in flatpak AppStream metadata for GUI
run: |
sed -i '/<releases>/a\
<release version="${{ github.event.inputs.version }}" date="'"$(date -I)"'" />' flatpak/*.appdata.xml
- name: Update Cargo.lock - name: Update Cargo.lock
run: cargo update --workspace run: cargo update --workspace

View file

@ -225,22 +225,15 @@ else
echo "✅ Local build completed: $DEB_FILE" echo "✅ Local build completed: $DEB_FILE"
fi fi
# Calculate SHA256 hash of the .deb file
echo "🔢 Calculating SHA256 hash..."
read -r DEB_SHA256 _ < <(sha256sum "$DEB_FILE")
echo " Hash: $DEB_SHA256"
echo "📝 Creating manifest with local .deb..." echo "📝 Creating manifest with local .deb..."
# Modify the manifest to use the local file # Modify the manifest to use the local file
jq --arg deb_path "file://$DEB_FILE" --arg deb_hash "$DEB_SHA256" ' jq --arg deb_path "$DEB_FILE" --arg PWD "$PWD" '
.modules[0].sources = [ .modules[0].sources[0] = {
{ "type": "file",
"type": "file", "path": $deb_path
"url": $deb_path, } |
"sha256": $deb_hash .modules[0].sources[1].path = $PWD + "/" + .modules[0].sources[1].path
}
]
' "$MANIFEST_FILE" > "$TEMP_MANIFEST" ' "$MANIFEST_FILE" > "$TEMP_MANIFEST"
MANIFEST_FILE="$TEMP_MANIFEST" MANIFEST_FILE="$TEMP_MANIFEST"

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>org.eigenwallet.app</id>
<launchable type="desktop-id">org.eigenwallet.app</launchable>
<name>eigenwallet GUI</name>
<summary>GUI for XMR&lt;&gt;BTC Atomic Swaps written in Rust</summary>
<description><p>GUI for XMR&lt;&gt;BTC Atomic Swaps written in Rust</p></description>
<metadata_license>CC0-1.0</metadata_license>
<icon type="stock">unstoppableswap-gui-rs</icon>
<categories>
<category>Utility</category>
</categories>
<releases>
<release version="3.2.11" date="2025-11-09" />
</releases>
</component>

View file

@ -24,12 +24,18 @@
"url": "https://cdn.crabnebula.app/download/unstoppableswap/unstoppableswap-gui-rs/latest/platform/debian-x86_64", "url": "https://cdn.crabnebula.app/download/unstoppableswap/unstoppableswap-gui-rs/latest/platform/debian-x86_64",
"sha256": "f1fdb9dc164ed45e31fbba7209da23fa4cb1d461442c9dd0b6bc763b8bf1bb59", "sha256": "f1fdb9dc164ed45e31fbba7209da23fa4cb1d461442c9dd0b6bc763b8bf1bb59",
"only-arches": ["x86_64"] "only-arches": ["x86_64"]
},
{
"type": "file",
"path": "flatpak/org.eigenwallet.app.appdata.xml"
} }
], ],
"build-commands": [ "build-commands": [
"ar -x *.deb", "ar -x *.deb",
"tar -xf data.tar.gz", "tar -xf data.tar.gz",
"install -Dm755 usr/bin/unstoppableswap-gui-rs /app/bin/unstoppableswap-gui-rs" "install -Dm755 usr/bin/unstoppableswap-gui-rs -t /app/bin",
"install -Dm644 *.appdata.xml -t /app/share/metainfo",
"mv usr/share/icons /app/share"
] ]
} }
] ]