From ee6c91e09498c9036452d60599ca7a25974b78f2 Mon Sep 17 00:00:00 2001 From: purian23 Date: Sun, 12 Jul 2026 15:23:04 -0400 Subject: [PATCH] refactor(workflows): update release refs to stable in CI configurations Port 1.5 (cherry picked from commit 406dcfe110f939edab183043d649437164e89f57) --- .github/workflows/dms-stable.yml | 4 ++-- .github/workflows/go-ci.yml | 2 +- .github/workflows/nix-pr-check.yml | 2 +- .github/workflows/point-release.yml | 4 ++-- .github/workflows/port.yml | 22 +++++++++++----------- .github/workflows/prek.yml | 2 +- scripts/port-audit.sh | 10 +++++----- scripts/port.sh | 3 ++- 8 files changed, 25 insertions(+), 24 deletions(-) diff --git a/.github/workflows/dms-stable.yml b/.github/workflows/dms-stable.yml index 2af3c3f5c..a8f65d7fd 100644 --- a/.github/workflows/dms-stable.yml +++ b/.github/workflows/dms-stable.yml @@ -45,7 +45,7 @@ jobs: git push "https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.git" HEAD:refs/heads/stable --force cut-release-branch: - # create release/X.Y at each vX.Y.0 tag + # create stable-X.Y at each vX.Y.0 tag if: ${{ !contains(github.ref_name, '-') }} runs-on: ubuntu-latest steps: @@ -71,7 +71,7 @@ jobs: echo "not a vX.Y.0 tag, no release branch to cut" exit 0 fi - branch="release/${BASH_REMATCH[1]}.${BASH_REMATCH[2]}" + branch="stable-${BASH_REMATCH[1]}.${BASH_REMATCH[2]}" if git ls-remote --exit-code origin "refs/heads/${branch}" >/dev/null 2>&1; then echo "${branch} already exists" exit 0 diff --git a/.github/workflows/go-ci.yml b/.github/workflows/go-ci.yml index d4fae9f2d..4b779d89a 100644 --- a/.github/workflows/go-ci.yml +++ b/.github/workflows/go-ci.yml @@ -8,7 +8,7 @@ on: - "core/**" - ".github/workflows/go-ci.yml" pull_request: - branches: [master, main, "release/**"] + branches: [master, main, "stable-*"] paths: - "core/**" - ".github/workflows/go-ci.yml" diff --git a/.github/workflows/nix-pr-check.yml b/.github/workflows/nix-pr-check.yml index 78319dcd1..eb540cedd 100644 --- a/.github/workflows/nix-pr-check.yml +++ b/.github/workflows/nix-pr-check.yml @@ -2,7 +2,7 @@ name: Nix flake and NixOS tests on: pull_request: - branches: [master, main, "release/**"] + branches: [master, main, "stable-*"] paths: - "flake.*" - "distro/nix/**" diff --git a/.github/workflows/point-release.yml b/.github/workflows/point-release.yml index 59fa8de36..9cb871b5c 100644 --- a/.github/workflows/point-release.yml +++ b/.github/workflows/point-release.yml @@ -1,6 +1,6 @@ name: Point release -# Cuts vX.Y.Z from release/X.Y: runs the port audit (warn-only), bumps +# Cuts vX.Y.Z from stable-X.Y: runs the port audit (warn-only), bumps # quickshell/VERSION, tags, and dispatches the Release workflow. Distro # builds are dispatched separately. @@ -33,7 +33,7 @@ jobs: if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then echo "::error::version must be X.Y.Z (got '$VERSION')"; exit 1 fi - echo "branch=release/${VERSION%.*}" >> "$GITHUB_OUTPUT" + echo "branch=stable-${VERSION%.*}" >> "$GITHUB_OUTPUT" echo "tag=v${VERSION}" >> "$GITHUB_OUTPUT" - name: Create GitHub App token diff --git a/.github/workflows/port.yml b/.github/workflows/port.yml index a17d609ed..5747a58b5 100644 --- a/.github/workflows/port.yml +++ b/.github/workflows/port.yml @@ -1,10 +1,10 @@ name: Port to release branch -# Ports flagged commits from master onto release/X.Y branches: +# Ports flagged commits from master onto stable-X.Y branches: # - "port 1.5" flag in a commit message pushed to master — own line or -# mid-line; separators : / - or space; "release/1.5" also accepted; +# mid-line; separators : / - or space; "stable-1.5" also accepted; # comma lists ("Port: 1.5, 1.4") work in the own-line form -# - "port release/1.5" label on a merged PR +# - "port stable-1.5" label on a merged PR # Conflicts are reported to the "Port status: " tracking issue. on: @@ -59,16 +59,16 @@ jobs: # own-line form (supports comma lists), validated version-shaped t1=$(git log -1 --format=%B "$sha" | { grep -iE '^Port[:/ -]' || true; } | sed -E 's|^port[-:/ ]+||I' | tr ',' '\n' | - sed 's/[[:space:]]//g; /^$/d' | sed 's|^release/||I' | + sed 's/[[:space:]]//g; /^$/d' | sed -E 's,^stable-,,I' | { grep -E '^[0-9]+\.[0-9]+(\.[0-9]+)?$' || true; }) # mid-line form, e.g. "fix thing fixes #2802 port 1.5" t2=$(git log -1 --format=%B "$sha" | - { grep -oiE '\bport[-: /]+(release/)?[0-9]+\.[0-9]+(\.[0-9]+)?\b' || true; } | - sed -E 's|^port[-:/ ]+||I' | sed 's|^release/||I') + { grep -oiE '\bport[-: /]+(stable-)?[0-9]+\.[0-9]+(\.[0-9]+)?\b' || true; } | + sed -E 's|^port[-:/ ]+||I' | sed -E 's,^stable-,,I') targets=$(printf '%s\n%s\n' "$t1" "$t2" | sed '/^$/d' | sort -u) for ver in $targets; do - echo "::group::port $sha -> release/$ver" - bash scripts/port.sh "release/$ver" "$sha" + echo "::group::port $sha -> stable-$ver" + bash scripts/port.sh "stable-$ver" "$sha" echo "::endgroup::" done done @@ -90,12 +90,12 @@ jobs: git config user.email "dms-ci[bot]@users.noreply.github.com" targets=$(jq -r '.[] | select(startswith("port ")) | sub("^port +"; "")' <<<"$LABELS" | - sed 's|^release/||' | sort -u) + sed -E 's,^stable-,,' | sort -u) [ -n "$targets" ] || { echo "no port labels, nothing to do"; exit 0; } [ -n "$MERGE_SHA" ] || { echo "::error::PR has no merge commit sha"; exit 1; } for ver in $targets; do - echo "::group::port PR #${PORT_SOURCE_PR} ($MERGE_SHA) -> release/$ver" - bash scripts/port.sh "release/$ver" "$MERGE_SHA" + echo "::group::port PR #${PORT_SOURCE_PR} ($MERGE_SHA) -> stable-$ver" + bash scripts/port.sh "stable-$ver" "$MERGE_SHA" echo "::endgroup::" done diff --git a/.github/workflows/prek.yml b/.github/workflows/prek.yml index af6678a19..68dd4fecf 100644 --- a/.github/workflows/prek.yml +++ b/.github/workflows/prek.yml @@ -3,7 +3,7 @@ name: Pre-commit Checks on: push: pull_request: - branches: [master, main, "release/**"] + branches: [master, main, "stable-*"] jobs: pre-commit-check: runs-on: ubuntu-latest diff --git a/scripts/port-audit.sh b/scripts/port-audit.sh index 7e20669d2..34a1bbdb3 100755 --- a/scripts/port-audit.sh +++ b/scripts/port-audit.sh @@ -3,7 +3,7 @@ # # Usage: port-audit.sh [] [--issue] # -# Target defaults to the newest origin/release/* branch. --issue writes the +# Target defaults to the newest origin/stable-* branch. --issue writes the # report to the "Port status: " tracking issue body (needs gh auth). set -euo pipefail @@ -19,9 +19,9 @@ done git fetch origin --quiet 2>/dev/null || true if [ -z "$TARGET" ]; then - TARGET=$(git branch -r --list 'origin/release/*' --format='%(refname:short)' | + TARGET=$(git branch -r --list 'origin/stable-*' --format='%(refname:short)' | sed 's|^origin/||' | sort -V | tail -1) - [ -n "$TARGET" ] || { echo "error: no origin/release/* branch found" >&2; exit 1; } + [ -n "$TARGET" ] || { echo "error: no origin/stable-* branch found" >&2; exit 1; } fi git rev-parse --verify "origin/${TARGET}" >/dev/null 2>&1 || { echo "error: branch origin/${TARGET} not found" >&2; exit 1; } @@ -42,8 +42,8 @@ flagged="" fix_count=0 other_count=0 flagged_count=0 -VER="${TARGET#release/}" -FLAG_RE="\\bport[-: /]+(release/)?${VER//./\\.}\\b" +VER="${TARGET#stable-}" +FLAG_RE="\\bport[-: /]+(stable-)?${VER//./\\.}\\b" while read -r mark sha; do [ "$mark" = "+" ] || continue [ -n "${PORTED[$sha]:-}" ] && continue diff --git a/scripts/port.sh b/scripts/port.sh index 498acd9a5..9e5c06004 100755 --- a/scripts/port.sh +++ b/scripts/port.sh @@ -50,7 +50,8 @@ report_conflict() { local sha="$1" short subject branch issue short=$(git rev-parse --short "$sha") subject=$(git log -1 --format=%s "$sha") - branch="port/${short}-${TARGET#release/}" + local ver="${TARGET#stable-}" + branch="port/${short}-${ver}" git push origin "refs/remotes/origin/${TARGET}:refs/heads/${branch}" 2>/dev/null || log "conflict branch ${branch} already exists" issue=$(tracking_issue)