use ostree for creating repo #45
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Flatpak Build and Release | |
on: | |
push: | |
branches: ["master"] | |
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: | | |
TODAY=$(date +%Y-%m-%d) | |
APPDATA="flatpak/com.futrnostr.futr.appdata.xml" | |
sed -i "s/<release version=\"continuous\" date=\"[^\"]*\"/<release version=\"continuous\" date=\"$TODAY\"/" "$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: Delete existing release and tag | |
uses: dev-drprasad/delete-tag-and-release@v1.0 | |
with: | |
tag_name: continuous | |
delete_release: true | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
tag_name: continuous | |
name: "🚧 Development Build (Continuous)" | |
files: "futr.flatpak" | |
prerelease: true | |
draft: false | |
body: | | |
⚠️ This is an automated development build from the latest master branch. | |
This build is not recommended for production use. | |
Last updated: ${{ github.event.head_commit.timestamp }} | |
token: ${{ secrets.GITHUB_TOKEN }} |