Skip to content

chore(release): prepare v0.1.0 and remove docs #5

chore(release): prepare v0.1.0 and remove docs

chore(release): prepare v0.1.0 and remove docs #5

Workflow file for this run

name: Packages
# Builds all five Linux formats. Native packages and AppImage get headless
# install checks. A matching version tag publishes them after CI succeeds.
on:
push:
tags: ['v*']
pull_request:
paths:
- 'packaging/**'
- '.github/workflows/packages.yml'
- '.github/workflows/ci.yml'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: packages-${{ github.ref }}
cancel-in-progress: false
jobs:
prepare:
name: Validate release version
runs-on: ubuntu-24.04
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- uses: actions/checkout@v4
- name: Check version before building packages
id: version
shell: bash
run: |
version="$(packaging/linux/version.sh)"
if [[ ! "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Packaging requires a numeric MAJOR.MINOR.PATCH version, got: $version" >&2
exit 1
fi
if [[ "$GITHUB_REF_TYPE" == tag && "$GITHUB_REF_NAME" != "v$version" ]]; then
echo "Tag $GITHUB_REF_NAME does not match Cargo.toml version $version" >&2
exit 1
fi
echo "version=$version" >> "$GITHUB_OUTPUT"
if [[ "$GITHUB_REF_TYPE" != tag ]]; then
echo 'Build only: download packages from this run’s Artifacts section. To publish, push a matching vMAJOR.MINOR.PATCH tag.' >> "$GITHUB_STEP_SUMMARY"
fi
verify:
name: Release checks
needs: prepare
uses: ./.github/workflows/ci.yml
deb:
name: Debian package
needs: prepare
runs-on: ubuntu-24.04
# Debian 13 has Qt 6.8; the app needs 6.5 or newer.
container: debian:trixie
env:
QMAKE: /usr/lib/qt6/bin/qmake
steps:
- name: Install build dependencies
run: |
apt-get update
apt-get install -y --no-install-recommends \
build-essential pkg-config curl ca-certificates git dpkg-dev \
libsqlite3-dev \
qt6-base-dev qt6-base-dev-tools \
qt6-declarative-dev qt6-declarative-dev-tools
- uses: actions/checkout@v4
- run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: dtolnay/rust-toolchain@stable
- run: packaging/linux/deb/build-deb.sh dist
- uses: actions/upload-artifact@v4
with:
name: deb
path: dist/*.deb
if-no-files-found: error
deb-install:
name: Install .deb on ${{ matrix.image }}
needs: deb
runs-on: ubuntu-24.04
container: ${{ matrix.image }}
strategy:
fail-fast: false
matrix:
image: ['debian:trixie', 'ubuntu:rolling']
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: deb
path: dist
- name: Install the package with its dependencies
run: |
apt-get update
apt-get install -y ./dist/*.deb
- run: packaging/linux/smoke-test.sh
rpm:
name: Fedora package
needs: prepare
runs-on: ubuntu-24.04
container: fedora:latest
steps:
- name: Install build dependencies
run: |
dnf install -y git rpm-build cargo rust gcc-c++ \
qt6-qtbase-devel qt6-qtdeclarative-devel sqlite-devel \
desktop-file-utils libappstream-glib
- uses: actions/checkout@v4
- run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- run: packaging/linux/rpm/build-rpm.sh dist
- uses: actions/upload-artifact@v4
with:
name: rpm
path: dist/*.rpm
if-no-files-found: error
rpm-install:
name: Install .rpm on Fedora
needs: rpm
runs-on: ubuntu-24.04
container: fedora:latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: rpm
path: dist
- run: dnf install -y ./dist/*.rpm
- run: packaging/linux/smoke-test.sh
arch:
name: Arch Linux package
needs: prepare
runs-on: ubuntu-24.04
container: archlinux:latest
steps:
- name: Install build dependencies
run: |
pacman -Syu --noconfirm --needed base-devel git rust \
qt6-base qt6-declarative qt6-wayland sqlite hicolor-icon-theme
# makepkg refuses to run as root.
useradd --create-home builder
- uses: actions/checkout@v4
- name: Build with makepkg
run: |
chown -R builder "$GITHUB_WORKSPACE"
su builder -c "git config --global --add safe.directory '$GITHUB_WORKSPACE' && packaging/linux/arch/build-arch.sh dist"
- uses: actions/upload-artifact@v4
with:
name: arch
path: dist/*.pkg.tar.zst
if-no-files-found: error
arch-install:
name: Install package on Arch Linux
needs: arch
runs-on: ubuntu-24.04
container: archlinux:latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: arch
path: dist
- run: |
pacman -Syu --noconfirm
pacman -U --noconfirm dist/*.pkg.tar.zst
- run: packaging/linux/smoke-test.sh
appimage:
name: AppImage
needs: prepare
# The AppImage runs where glibc is at least as new as here: 2022 onwards.
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential pkg-config libsqlite3-dev libgl1-mesa-dev libegl1 \
libxkbcommon-x11-0 libxcb-cursor0 libxcb-icccm4 libxcb-image0 \
libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-shape0 \
libxcb-xinerama0 libxcb-xkb1 libwayland-cursor0 libwayland-egl1 \
libfontconfig1 libdbus-1-3
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: '6.8.3'
cache: true
- uses: dtolnay/rust-toolchain@stable
- run: packaging/linux/appimage/build-appimage.sh dist
env:
QMAKE: ${{ env.QT_ROOT_DIR }}/bin/qmake
- uses: actions/upload-artifact@v4
with:
name: appimage
path: dist/*.AppImage
if-no-files-found: error
appimage-run:
name: Run AppImage on Ubuntu 24.04
needs: appimage
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: appimage
path: dist
- name: Install what every desktop has
# AppImages leave out the graphics driver libraries on purpose; the
# headless runner lacks them, unlike any desktop system.
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends libegl1 libgl1 libopengl0 libfontconfig1
- run: |
chmod +x dist/*.AppImage
packaging/linux/smoke-test.sh "$(ls "$PWD"/dist/*.AppImage)"
env:
# No FUSE on the runner; let the AppImage unpack itself.
APPIMAGE_EXTRACT_AND_RUN: '1'
flatpak:
name: Flatpak bundle
needs: prepare
runs-on: ubuntu-24.04
container:
image: ghcr.io/flathub-infra/flatpak-github-actions:kde-6.9
options: --privileged
steps:
- uses: actions/checkout@v4
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
manifest-path: packaging/linux/flatpak/org.betternotes.BetterNotes.yaml
bundle: BetterNotes.flatpak
cache-key: flatpak-builder-${{ github.sha }}
upload-artifact: false
- uses: actions/upload-artifact@v4
with:
name: flatpak
path: BetterNotes.flatpak
if-no-files-found: error
release:
name: Publish GitHub release
if: startsWith(github.ref, 'refs/tags/v')
needs: [prepare, verify, deb-install, rpm-install, arch-install, appimage-run, flatpak]
runs-on: ubuntu-24.04
permissions:
contents: write
env:
VERSION: ${{ needs.prepare.outputs.version }}
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- name: Prepare source archive and checksums
shell: bash
run: |
git archive --format=tar.gz --prefix="BetterNotes-$VERSION/" \
--output="dist/BetterNotes-$VERSION-source.tar.gz" HEAD
cd dist
mv BetterNotes.flatpak "BetterNotes-$VERSION-x86_64.flatpak"
# Explicit globs fail if any format is missing and exclude unrelated artifacts.
sha256sum -- *.deb *.rpm *.pkg.tar.zst *.AppImage *.flatpak *-source.tar.gz > SHA256SUMS
sha256sum --check SHA256SUMS
- uses: softprops/action-gh-release@v3
with:
name: BetterNotes v${{ needs.prepare.outputs.version }}
body: |
Linux preview of BetterNotes: independent sticky windows, autosave,
rich text, search, tags, themes, reminders, attachments, import/export,
backups and a CLI. Notes stay on your machine without an account.
**Downloads (x86_64 / amd64):** Debian `.deb`, Fedora `.rpm`,
Arch `.pkg.tar.zst`, portable `.AppImage`, and a `.flatpak` bundle.
The source archive and `SHA256SUMS` are included below.
Download your package and `SHA256SUMS` together, then run
`sha256sum --check --ignore-missing SHA256SUMS` and confirm `OK`.
See the [README](https://github.com/thebanri/BetterNotes#install)
for installation and desktop limitations. Flatpak currently lacks
host KWin integration and working host autostart. Desktop-wide Quick
Capture needs a custom shortcut; reminders need the app running.
prerelease: ${{ startsWith(needs.prepare.outputs.version, '0.') }}
fail_on_unmatched_files: true
files: |
dist/*.deb
dist/*.rpm
dist/*.pkg.tar.zst
dist/*.AppImage
dist/*.flatpak
dist/*-source.tar.gz
dist/SHA256SUMS
generate_release_notes: true