Skip to content

Commit a8a4265

Browse files
continuous release: fix for stable download link
1 parent 1d00171 commit a8a4265

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

.github/workflows/python-package.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,20 @@ jobs:
179179
# exclude macos wheels for now
180180
find tmp/ -type f -name '*.whl' ! -name '*macos*' -print0 | while IFS= read -r -d '' wheel; do
181181
wheel_filename=$(basename "$wheel")
182-
# Remove the gith hash, e.g. `+1234567`, for a stable download link on the multi-backend pre-release
183-
cleaned_filename=$(echo "$wheel_filename" | sed -E 's/\+[0-9a-f]{7}-/-/g')
184-
mv "$wheel" "wheels/$cleaned_filename"
182+
if [[ $wheel_filename == *linux*x86_64* ]]; then
183+
mv "$wheel" wheels/bnb-linux-x86_64.whl
184+
elif [[ $wheel_filename == *linux*aarch64* ]]; then
185+
mv "$wheel" wheels/bnb-linux-aarch64.whl
186+
elif [[ $wheel_filename == *macosx*x86_64* ]]; then
187+
mv "$wheel" wheels/bnb-macos-x86_64.whl
188+
elif [[ $wheel_filename == *macosx*arm64* ]]; then
189+
mv "$wheel" wheels/bnb-macos-arm64.whl
190+
elif [[ $wheel_filename == *win*amd64* ]]; then
191+
mv "$wheel" wheels/bnb-windows-x86_64.whl
192+
else
193+
echo "Unknown wheel format: $wheel_filename"
194+
exit 1
195+
fi
185196
done
186197
- name: Inspect wheels directory after renaming files
187198
run: ls -alFR wheels/

0 commit comments

Comments
 (0)