Skip to content

debug flatpak output #104 #1

debug flatpak output #104

debug flatpak output #104 #1

Workflow file for this run

name: Flatpak Tagged Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
flatpak-build-and-release:
name: Flatpak Build and Release
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Flatpak and Flatpak Builder
run: |
sudo apt-get update
sudo apt-get install -y flatpak flatpak-builder
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
sudo flatpak install -y flathub org.kde.Platform//5.15-23.08 org.kde.Sdk//5.15-23.08
- name: Set up Haskell
uses: haskell-actions/setup@v2
with:
ghc-version: '9.6.6'
cabal-version: '3.10.3.0'
- name: Cache Cabal packages
uses: actions/cache@v4.1.2
with:
path: |
~/.cabal/packages
~/.cabal/store
dist-newstyle
key: ${{ runner.os }}-ghc-9.6.6-cabal-${{ hashFiles('**/*.cabal', '**/cabal.project', '**/cabal.project.freeze') }}
restore-keys: |
${{ runner.os }}-ghc-9.6.6-cabal-
- name: Update Cabal package list
run: cabal update
- name: Install Build Tools
run: |
sudo apt-get update
sudo apt-get install -y autoconf autogen automake libtool
- name: Install Qt5 Dependencies
run: |
sudo apt-get install -y qtdeclarative5-dev libqt5quick5 qt5-image-formats-plugins qttools5-dev-tools qtbase5-dev
- name: Install secp256k1 Library
run: |
git clone https://github.com/bitcoin-core/secp256k1 && \
cd secp256k1 && \
git checkout v0.5.1 && \
./autogen.sh && \
./configure --enable-module-schnorrsig --enable-module-extrakeys --enable-module-ecdh --enable-experimental --enable-module-recovery && \
make && \
sudo make install && \
cd ..
- name: Set Library Path
run: echo "/usr/local/lib" | sudo tee /etc/ld.so.conf.d/local.conf && sudo ldconfig
- name: Build with Cabal
run: cabal build
- name: Update appdata.xml
run: |
VERSION=${GITHUB_REF#refs/tags/v} # Extract version from tag
TODAY=$(date +%Y-%m-%d)
APPDATA="flatpak/com.futrnostr.futr.appdata.xml"
# Copy template if appdata.xml doesn't exist
if [ ! -f "$APPDATA" ]; then
cp flatpak/com.futrnostr.futr.appdata.xml.template "$APPDATA"
fi
# Add new release entry at the top of releases section
sed -i "/<releases>/a \ <release version=\"$VERSION\" date=\"$TODAY\">\n <description>\n <p>Release version $VERSION</p>\n </description>\n </release>" "$APPDATA"
- name: Build Flatpak
run: ./build-flatpak.sh
- name: Upload appdata.xml
uses: actions/upload-artifact@v4
with:
name: appdata-xml
path: flatpak/com.futrnostr.futr.appdata.xml
retention-days: 7
- name: Upload Flatpak Bundle
uses: actions/upload-artifact@v4
with:
name: flatpak-bundle
path: futr.flatpak
retention-days: 7
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: "futr.flatpak"
prerelease: false
name: "Release ${{ github.ref_name }}"
body: |
Official release ${{ github.ref_name }}
For the latest development build, see the [continuous release](https://github.com/${{ github.repository }}/releases/tag/continuous).
generate_release_notes: true
token: ${{ secrets.GITHUB_TOKEN }}