From 2a15f8ddb79322b8ae9f497288c1512fa661a998 Mon Sep 17 00:00:00 2001 From: Lars Erik Wik Date: Sat, 25 Jul 2026 19:44:35 +0200 Subject: [PATCH] Download man pages outside the checkout when packaging sources Downloading into the working tree made cargo package fail on 19 uncommitted files; RUNNER_TEMP keeps the tree clean and the files out of the crate. Co-Authored-By: Claude Opus 5 (1M context) Signed-off-by: Lars Erik Wik --- .github/workflows/release.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4d2dfe3..3816205 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,11 +37,14 @@ jobs: - name: Install protobuf compiler uses: ./.github/actions/setup-protoc + # Download outside the checkout: 'cargo package' refuses to run with + # uncommitted files in the working tree, and with --allow-dirty it would + # pack them into the crate as well. - name: Download man pages uses: actions/download-artifact@v8 with: name: man-pages - path: man-pages + path: ${{ runner.temp }}/man-pages # The man pages are generated, so 'cargo package' cannot include them: # unpack the .crate, add them under man/, and repack. @@ -51,7 +54,7 @@ jobs: cargo package tar xzf "target/package/${DIR}.crate" mkdir "${DIR}/man" - cp man-pages/*.1 man-pages/*.3 "${DIR}/man/" + cp "${RUNNER_TEMP}/man-pages/"*.1 "${RUNNER_TEMP}/man-pages/"*.3 "${DIR}/man/" tar czf "${DIR}.tar.gz" "${DIR}" # Artifacts named 'release-*' are attached to the GitHub release; see the