ci: export VERSION for rc sign steps and drop unsafe tag path filters

RC sign steps read ${VERSION} from the environment, but prepare only set
it locally. Export it via GITHUB_ENV like dev-bakery.yml. Drop paths:
filters on tag-triggered rc workflows (they pointed at the old beta-*.yml
names and can skip an RC publish when the tag diff misses those paths);
the job if: contains -rc. is the real gate. Skip -rc. tags in package.yml
because PKGBUILD pkgver cannot contain a hyphen. Rebuild bakery on
bread-utils changes (path dependency).
This commit is contained in:
Breadway 2026-08-23 14:37:08 +08:00
parent a9754d90ed
commit e2c6452e4f
4 changed files with 12 additions and 10 deletions

View file

@ -8,6 +8,7 @@ on:
branches: ['main'] branches: ['main']
paths: paths:
- 'bakery/**' - 'bakery/**'
- 'bread-utils/**'
- 'Cargo.toml' - 'Cargo.toml'
- 'Cargo.lock' - 'Cargo.lock'
- '.forgejo/workflows/dev-bakery.yml' - '.forgejo/workflows/dev-bakery.yml'

View file

@ -6,6 +6,9 @@ on:
jobs: jobs:
package: package:
# PKGBUILD pkgver cannot contain `-`; skip RC tags the same way
# release-bakery.yml does.
if: ${{ !contains(github.ref_name, '-rc.') }}
runs-on: [self-hosted, hestia] runs-on: [self-hosted, hestia]
container: container:
image: archlinux:latest image: archlinux:latest

View file

@ -7,11 +7,9 @@ name: beta (rc) bakery
on: on:
push: push:
tags: ['v*'] tags: ['v*']
paths: # No paths: filter. Tag pushes compare against an unrelated commit and
- 'bakery/**' # would skip the RC publish if bakery/** wasn't in that diff; the job
- 'Cargo.toml' # `if: contains -rc.` is the real gate.
- 'Cargo.lock'
- '.forgejo/workflows/beta-bakery.yml'
jobs: jobs:
build: build:
@ -35,6 +33,7 @@ jobs:
run: | run: |
set -euo pipefail set -euo pipefail
VERSION="${GITHUB_REF_NAME#v}" VERSION="${GITHUB_REF_NAME#v}"
echo "VERSION=${VERSION}" >> "$GITHUB_ENV"
PKG_DIR="/srv/breadway-dl/beta/bakery/${VERSION}" PKG_DIR="/srv/breadway-dl/beta/bakery/${VERSION}"
mkdir -p "${PKG_DIR}" mkdir -p "${PKG_DIR}"
cp "src/target/release/bakery" "${PKG_DIR}/bakery-x86_64" cp "src/target/release/bakery" "${PKG_DIR}/bakery-x86_64"

View file

@ -7,11 +7,9 @@ name: beta (rc) bread-theme
on: on:
push: push:
tags: ['v*'] tags: ['v*']
paths: # No paths: filter. Tag pushes compare against an unrelated commit and
- 'bread-theme/**' # would skip the RC publish if bread-theme/** wasn't in that diff; the
- 'Cargo.toml' # job `if: contains -rc.` is the real gate.
- 'Cargo.lock'
- '.forgejo/workflows/beta-bread-theme.yml'
jobs: jobs:
build: build:
@ -32,6 +30,7 @@ jobs:
run: | run: |
set -euo pipefail set -euo pipefail
VERSION="${GITHUB_REF_NAME#v}" VERSION="${GITHUB_REF_NAME#v}"
echo "VERSION=${VERSION}" >> "$GITHUB_ENV"
PKG_DIR="/srv/breadway-dl/beta/bread-theme/${VERSION}" PKG_DIR="/srv/breadway-dl/beta/bread-theme/${VERSION}"
mkdir -p "${PKG_DIR}" mkdir -p "${PKG_DIR}"
cp "src/target/release/bread-theme" "${PKG_DIR}/bread-theme-x86_64" cp "src/target/release/bread-theme" "${PKG_DIR}/bread-theme-x86_64"