Switch from not working AppImage build to Flatpak build #109
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: Linux build | |
on: | |
push: | |
branches: | |
- master | |
- next | |
- 'next*' | |
jobs: | |
qtbuild: | |
name: Build with Qt | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- run: git fetch --prune --unshallow --tags | |
- name: Set environment variables | |
run: | | |
echo "DATE=`date +%Y%m%d`" >> $GITHUB_ENV | |
echo "GIT_HASH=`git rev-parse --short HEAD`" >> $GITHUB_ENV | |
cat $GITHUB_ENV | |
- name: Display environment variables | |
run: env | sort | |
- name: Prepare flatpak build | |
run: | | |
set -x | |
# Install build dependencies | |
sudo apt-get -y install flatpak-builder | |
sudo flatpak -y remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo | |
- name: Build | |
id: build | |
run: | | |
# Create welle-gui Flatpak | |
flatpak-builder --repo=wellerepo --install-deps-from=flathub --force-clean fp_build io.welle.welle_gui.json | |
flatpak --user remote-add --no-gpg-verify welle-repo wellerepo | |
flatpak --user install welle-repo io.welle.welle_gui | |
flatpak build-bundle wellerepo welle-io.flatpak io.welle.welle-gui | |
# Prepare publish | |
mkdir publish | |
mv welle-io.flatpak publish/"$DATE"_"$GIT_HASH"_Linux_welle-io-x86_64.flatpak | |
- name: Archive artifacts (welle.io AppImage) | |
if: always() && steps.create_appimage.outcome == 'success' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: welle.io AppImage | |
path: publish/*.flatpak | |
if-no-files-found: error | |
- name: Upload to nightly server | |
if: always() && steps.create_appimage.outcome == 'success' | |
uses: dennisameling/ftp-upload-action@v1 | |
with: | |
server: a2f24.netcup.net # welle-io-nightlies.albrechtloh.de is redirected to here | |
secure: true | |
username: ${{ secrets.SFTP_USER }} | |
password: ${{ secrets.SFTP_PASSWORD }} | |
local_dir: publish/ |