add flatpak build job #20
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: Build flatpak | |
on: push | |
env: | |
PYTHON_VERSION: "3.11" | |
jobs: | |
build: | |
name: Build flatpak 📦 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up flatpak-builder | |
run: | | |
sudo apt update | |
sudo apt install -y flatpak flatpak-builder | |
flatpak remote-add --if-not-exists --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo | |
- name: Install the latest version of uv | |
uses: astral-sh/setup-uv@v2 | |
with: | |
version: "latest" | |
enable-cache: true | |
- name: Install Python | |
run: | | |
uv python install $PYTHON_VERSION | |
- name: Build flatpak | |
run: | | |
uv venv | |
source .venv/bin/activate | |
uv pip install -e .[build] | |
uv pip install pip | |
env | |
./resources/flatpak/make_flatpak.sh | |
- name: Build flatpak-bundle | |
run: | | |
ls -al | |
ls -al warnet_flatpak | |
flatpak build-bundle warnet_flatpak warnet.flatpak com.bitcoindevproject.Warnet | |
- name: Upload flatpak artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: warnet-flatpak | |
path: warnet.flatpak |