ci(release): reuse cached builds from main

The release job never hit a cache: its rust-cache key contained the job
name, tags cannot restore caches of earlier tags, and rpmbuild rebuilt
the whole workspace under its own compiler flags.

CI on main now saves shared debug and release caches that the release
workflow restores. Quality gates and the package build run in parallel,
and the GitHub release is created once both pass. The RPM spec skips
its cargo build when the caller passes --define "prebuilt 1".
This commit is contained in:
nvrl committed 2026-09-28 23:26:24 +02:00
1 parent 889b2aa4a9
commit 3d61fc637b
3 files changed
+118 -21

No files matched your search

+6
View File
@@ -60,12 +60,18 @@ test -n "%{?git_dir}" || (echo 'Pass --define "git_dir $PWD" from the repo root'
test -f %{git_dir}/Cargo.toml
cp -a %{git_dir}/LICENSE .
%build
# The release workflow has already built target/release and passes --define "prebuilt 1".
# rpmbuild exports its own compiler flags, which would make cargo rebuild everything.
%if 0%{?prebuilt}
test -x %{git_dir}/target/release/pdfs
%else
cd %{git_dir}
cargo build --release --locked \
--bin pdfs \
--bin pdfs-tray \
--bin pdfs-app \
--bin pdfs-prompt
%endif
%install
rel=%{git_dir}/target/release