Skip to content

Commit 16b1bf9

Browse files
Merge branch 'staging' into ci
2 parents 7c5c44f + 1431e10 commit 16b1bf9

5 files changed

Lines changed: 131 additions & 2 deletions

File tree

.github/workflows/build.yaml

Lines changed: 69 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,9 +490,76 @@ jobs:
490490
name: stack_wallet-ios-aarch64-${{ steps.ver.outputs.version }}
491491
path: stack_wallet-ios-aarch64-${{ steps.ver.outputs.version }}.ipa
492492

493+
build-flatpak:
494+
runs-on: ubuntu-24.04
495+
needs: build-linux
496+
steps:
497+
- uses: actions/checkout@v6
498+
499+
- name: Set version
500+
id: ver
501+
run: |
502+
if [ "${{ github.ref_type }}" = "tag" ]; then
503+
VERSION="${{ github.ref_name }}"
504+
VERSION="${VERSION#v}"
505+
elif [ -n "${{ inputs.version }}" ]; then
506+
VERSION="${{ inputs.version }}"
507+
else
508+
VERSION="0.0.0-staging.${{ github.run_number }}"
509+
fi
510+
echo "version=${VERSION}" >> $GITHUB_OUTPUT
511+
512+
- name: Download Linux bundle
513+
uses: actions/download-artifact@v4
514+
with:
515+
name: stack_wallet-linux-x86_64-${{ steps.ver.outputs.version }}
516+
517+
- name: Stage bundle and icon
518+
run: |
519+
tar -xzf "stack_wallet-linux-x86_64-${{ steps.ver.outputs.version }}.tar.gz" -C flatpak/
520+
cp asset_sources/icon/stack_wallet/icon.png flatpak/com.cypherstack.stackwallet.png
521+
522+
- name: Install Flatpak tools
523+
run: |
524+
sudo apt-get update -q
525+
sudo apt-get install -y flatpak flatpak-builder
526+
527+
- name: Set up Flathub remote
528+
run: flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
529+
530+
- name: Cache Flatpak SDK
531+
uses: actions/cache@v4
532+
with:
533+
path: ~/.local/share/flatpak
534+
key: flatpak-freedesktop-24.08-v1
535+
536+
- name: Install Flatpak SDK
537+
run: |
538+
flatpak install --user --noninteractive flathub \
539+
org.freedesktop.Platform//24.08 \
540+
org.freedesktop.Sdk//24.08
541+
542+
- name: Build Flatpak
543+
run: |
544+
flatpak-builder --user --force-clean \
545+
--repo=flatpak-repo \
546+
build-flatpak flatpak/com.cypherstack.stackwallet.yaml
547+
548+
- name: Bundle Flatpak
549+
run: |
550+
flatpak build-bundle flatpak-repo \
551+
--runtime-repo=https://flathub.org/repo/flathub.flatpakrepo \
552+
"stack_wallet-linux-x86_64-${{ steps.ver.outputs.version }}.flatpak" \
553+
com.cypherstack.stackwallet
554+
555+
- uses: actions/upload-artifact@v4
556+
with:
557+
name: stack_wallet-flatpak-x86_64-${{ steps.ver.outputs.version }}
558+
path: stack_wallet-linux-x86_64-${{ steps.ver.outputs.version }}.flatpak
559+
493560
release:
494561
if: github.ref_type == 'tag'
495-
needs: [build-linux, build-android, build-windows, build-macos, build-ios]
562+
needs: [build-linux, build-android, build-windows, build-macos, build-ios, build-flatpak]
496563
runs-on: ubuntu-latest
497564
permissions:
498565
contents: write
@@ -509,7 +576,7 @@ jobs:
509576
name=$(basename "$dir")
510577
(cd "$dir" && zip -r "../../release-files/${name}.zip" .)
511578
done
512-
find artifacts/ \( -name "*.tar.gz" -o -name "*.zip" -o -name "*.ipa" \) -mindepth 2 -exec mv {} release-files/ \;
579+
find artifacts/ \( -name "*.tar.gz" -o -name "*.zip" -o -name "*.ipa" -o -name "*.flatpak" \) -mindepth 2 -exec mv {} release-files/ \;
513580
find artifacts/ -name "*.apk" -mindepth 2 -exec mv {} release-files/ \;
514581
515582
- uses: softprops/action-gh-release@v2
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[Desktop Entry]
2+
Name=Stack Wallet
3+
Comment=Open-source non-custodial cryptocurrency wallet
4+
Exec=stack_wallet
5+
Icon=com.cypherstack.stackwallet
6+
Type=Application
7+
Categories=Finance;
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<component type="desktop-application">
3+
<id>com.cypherstack.stackwallet</id>
4+
<metadata_license>CC0-1.0</metadata_license>
5+
<project_license>GPL-3.0-only</project_license>
6+
<name>Stack Wallet</name>
7+
<summary>Open-source non-custodial cryptocurrency wallet</summary>
8+
<description>
9+
<p>
10+
Stack Wallet is an open-source, non-custodial, privacy-focused
11+
cryptocurrency wallet supporting multiple coins.
12+
</p>
13+
</description>
14+
<url type="homepage">https://stackwallet.com</url>
15+
<url type="bugtracker">https://github.com/cypherstack/stack_wallet/issues</url>
16+
<content_rating type="oars-1.1"/>
17+
</component>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
app-id: com.cypherstack.stackwallet
2+
runtime: org.freedesktop.Platform
3+
runtime-version: '24.08'
4+
sdk: org.freedesktop.Sdk
5+
command: stack_wallet
6+
7+
finish-args:
8+
- --share=network
9+
- --share=ipc
10+
- --socket=fallback-x11
11+
- --socket=wayland
12+
- --device=dri
13+
- --filesystem=~/.stackwallet
14+
- --talk-name=org.freedesktop.secrets
15+
- --talk-name=org.freedesktop.Notifications
16+
17+
modules:
18+
- name: stack_wallet
19+
buildsystem: simple
20+
build-commands:
21+
# Install the pre-built Flutter bundle under /app/lib/stack_wallet/ so
22+
# the binary's $ORIGIN/lib and $ORIGIN/data lookups resolve correctly.
23+
- mkdir -p /app/lib/stack_wallet
24+
- install -Dm755 bundle/stack_wallet /app/lib/stack_wallet/stack_wallet
25+
- cp -r bundle/lib bundle/data /app/lib/stack_wallet/
26+
# Wrapper script so the Flatpak command path resolves to the binary.
27+
- install -Dm755 stack_wallet.sh /app/bin/stack_wallet
28+
- install -Dm644 com.cypherstack.stackwallet.desktop
29+
/app/share/applications/com.cypherstack.stackwallet.desktop
30+
- install -Dm644 com.cypherstack.stackwallet.metainfo.xml
31+
/app/share/metainfo/com.cypherstack.stackwallet.metainfo.xml
32+
- install -Dm644 com.cypherstack.stackwallet.png
33+
/app/share/icons/hicolor/512x512/apps/com.cypherstack.stackwallet.png
34+
sources:
35+
- type: dir
36+
path: .

flatpak/stack_wallet.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
exec /app/lib/stack_wallet/stack_wallet "$@"

0 commit comments

Comments
 (0)