From df59fc35b446b6ca9b714d67868b1f335238580d Mon Sep 17 00:00:00 2001 From: Sebastian Spaeth Date: Fri, 17 Apr 2026 12:11:55 +0200 Subject: [PATCH] CI: Only publish releases into the Debian stable component Previously, we would push all tagged releases into the stable component, including alphas and rc's. Let's use some regex to only push stable releases which conform to tag "^v+\d\.+\d\.+\d$" so we ONLY get the manually published releases into the stable component. All pre-releases go into the "unstable" component for now. Nightly builds go into the "dev" component (as before) and feature branches still get their dedicated component named after the branch. TODO: It would be nifty if stable releases would ALSO be published at the unstable component. --- .forgejo/workflows/build-debian.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.forgejo/workflows/build-debian.yml b/.forgejo/workflows/build-debian.yml index 69a2e0508..e7833b948 100644 --- a/.forgejo/workflows/build-debian.yml +++ b/.forgejo/workflows/build-debian.yml @@ -92,10 +92,13 @@ jobs: BASE_VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r ".packages[] | select(.name == \"conduwuit\").version" | sed 's/[^a-zA-Z0-9.+]/~/g') # VERSION is the package version, COMPONENT is used in # apt's repository config like a git repo branch - if [[ "${{ forge.ref }}" == "refs/tags/"* ]]; then - # Use the "stable" component for tagged releases + VERSION=$BASE_VERSION + if [[ ${{ forge.ref_name }} =~ ^v+[0-9]\.+[0-9]\.+[0-9]$ ]]; then + # Use the "stable" component for tagged semver releases COMPONENT="stable" - VERSION=$BASE_VERSION + elif [[ ${{ forge.ref }} =~ ^refs/tags/^v+[0-9]\.+[0-9]\.+[0-9] ]]; then + # Use the "unstable" component for tagged semver pre-releases + COMPONENT="unstable" else # Use the "dev" component for development builds SHA=$(echo "${{ forge.sha }}" | cut -c1-7)