diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8f875f2..ee75992 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,11 +36,15 @@ jobs: # never build. Fail the release rather than publish that again. run: | set -euo pipefail + # Listed once into a file rather than piped per-file: `tar | grep -q` + # makes grep exit on its first match, tar dies of SIGPIPE, and + # pipefail then reports the whole check as a failure. + tar tzf dist/*.tar.gz > "$RUNNER_TEMP/sdist-listing.txt" for f in CMakeLists.txt src/cuda/knn.cu src/cuda/lof.cu \ src/cuda/pipeline.cu src/cuda/preprocess.cu \ src/cuda/binding.cpp include/culof.h \ include/culof_internal.cuh src/culof/__init__.py; do - tar tzf dist/*.tar.gz | grep -q "/$f$" \ + grep -q "/$f$" "$RUNNER_TEMP/sdist-listing.txt" \ || { echo "::error::sdist is missing $f"; exit 1; } done echo "sdist contains every file needed to build"