File tree Expand file tree Collapse file tree 2 files changed +22
-12
lines changed
Expand file tree Collapse file tree 2 files changed +22
-12
lines changed Original file line number Diff line number Diff line change @@ -34,16 +34,18 @@ jobs:
3434 uses : actions/download-artifact@v4
3535 with :
3636 path : artifacts/
37- merge-multiple : true
3837
3938 - name : Merge wheels
4039 run : |
41- set -euo pipefail
42-
43- # find unique versions in names like wheels___1.2.3___manylinux2014_x86_64.zip
44- versions=$(ls wheels___*___*.zip 2>/dev/null \
45- | sed -E 's/wheels___([^_]+)___.*\.zip/\1/' \
46- | sort -u)
40+ # find unique versions
41+ ls artifacts
42+
43+ versions=$(
44+ cd artifacts &&
45+ ls wheels___*___* 2>/dev/null \
46+ | sed -E 's/wheels___([^_]+)___.*/\1/' \
47+ | sort -u
48+ )
4749
4850 if [[ -z "$versions" ]]; then
4951 echo "No wheel archives found, skipping."
@@ -52,19 +54,27 @@ jobs:
5254
5355 for version in $versions; do
5456 out="output/libfranka_${version}_wheels.zip"
57+ out_full=$(realpath "$out")
5558 echo "Creating $out from all wheels___${version}___*.zip…"
5659
5760 tmp=$(mktemp -d)
61+ mkdir "$tmp/dist"
5862 # unpack each matching zip into the temp dir
59- for z in wheels___${version}___*.zip; do
60- echo " ↳ Unpacking $z"
61- unzip -q "$z" -d "$tmp"
63+ for z in artifacts/wheels___${version}___/*.zip; do
64+ echo "Unpacking $z"
65+ tmp2=$(mktemp -d)
66+ tmp3=$(mktemp -d)
67+ unzip -q "$z" -d "$tmp2"
68+ unzip -q $tmp2/*.zip -d "$tmp3"
69+ mv $tmp3/dist/* "$tmp/dist/"
70+ rm -rf "$tmp3"
71+ rm -rf "$tmp2"
6272 done
6373
6474 # re-combine into a single zip
6575 (
6676 cd "$tmp"
67- zip -qr "../$out " .
77+ zip -qr "$out_full " .
6878 )
6979
7080 # clean up
Original file line number Diff line number Diff line change 1- 1.0.1
1+ 1.0.2
You can’t perform that action at this time.
0 commit comments