Skip to content

Merge pull request #835 from AlbrechtL/dependabot/github_actions/next… #128

Merge pull request #835 from AlbrechtL/dependabot/github_actions/next…

Merge pull request #835 from AlbrechtL/dependabot/github_actions/next… #128

Workflow file for this run

name: Linux build
on:
push:
branches:
- master
- next
- 'next*'
jobs:
qtbuild:
name: Build with Qt
runs-on: ubuntu-24.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: Install flatpak build dependencies
run: |
set -x
# Install build dependencies
sudo apt-get -y install flatpak-builder appstream-compose
flatpak remote-add --if-not-exists --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo
# For flatpak-builder-lint
flatpak install -y flathub org.flatpak.Builder
- name: Prepare flatpak build
run: |
# Add current build date into appdata.xml
APPDATA_DATE=`date +%Y-%m-%d`
sed -i 's/date="1970-01-01"/'date=\""$APPDATA_DATE"\"'/g' io.welle.welle_io.appdata.xml
# Add githash into appdata.xml
APPDATA_DATE_VERSION="2.7-unstable-$GIT_HASH"
sed -i 's/version="0.0.0"/'version=\""$APPDATA_DATE_VERSION"\"'/g' io.welle.welle_io.appdata.xml
# Check if file "io.welle.welle_io.appdata.xml" is valid
flatpak run --command=flatpak-builder-lint org.flatpak.Builder appstream io.welle.welle_io.appdata.xml
- name: Build
id: build
run: |
# Create welle-gui Flatpak
flatpak-builder --force-clean --user --install-deps-from=flathub --repo=repo --install builddir io.welle.welle_io.yml
flatpak build-bundle repo welle-io.flatpak io.welle.welle_io --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo
# Prepare publish
mkdir publish
mv welle-io.flatpak publish/"$DATE"_"$GIT_HASH"_Linux_welle-io-x86_64.flatpak
- name: Archive artifacts (welle.io Flatpak)
uses: actions/upload-artifact@v4
with:
name: welle.io Flatpak
path: publish/*.flatpak
if-no-files-found: error
- name: Upload to nightly server
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/