@@ -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
0 commit comments