Commit f3adf4f6 authored by Titus von Koeller's avatar Titus von Koeller
Browse files

continuous release: fix for stable download link

parent a8a42651
......@@ -176,24 +176,25 @@ jobs:
- name: Move and rename wheel files with pattern replacement
run: |
mkdir -p wheels/
# The whole point of the continuous release is to have a stable download link and the only way to have a PEP 440–compliant wheel name
# is to use a stable placeholder version. Otherwise, pip won't let you install the wheel. The cool thing is that we can now install the
# wheel directly from the GH pre-release which gets updated continuously, e.g.
# `pip install https://github.com/bitsandbytes-foundation/bitsandbytes/releases/download/continuous-release_main/bitsandbytes-1.33.7.preview-py3-none-manylinux_2_24_x86_64.whl`
STABLE_PLACEHOLDER_VERSION="1.33.7.preview"
# exclude macos wheels for now
find tmp/ -type f -name '*.whl' ! -name '*macos*' -print0 | while IFS= read -r -d '' wheel; do
wheel_filename=$(basename "$wheel")
if [[ $wheel_filename == *linux*x86_64* ]]; then
mv "$wheel" wheels/bnb-linux-x86_64.whl
elif [[ $wheel_filename == *linux*aarch64* ]]; then
mv "$wheel" wheels/bnb-linux-aarch64.whl
elif [[ $wheel_filename == *macosx*x86_64* ]]; then
mv "$wheel" wheels/bnb-macos-x86_64.whl
elif [[ $wheel_filename == *macosx*arm64* ]]; then
mv "$wheel" wheels/bnb-macos-arm64.whl
elif [[ $wheel_filename == *win*amd64* ]]; then
mv "$wheel" wheels/bnb-windows-x86_64.whl
else
echo "Unknown wheel format: $wheel_filename"
exit 1
fi
# Strip off the original version
rest=${wheel_filename#bitsandbytes-*-}
new_name="bitsandbytes-${STABLE_PLACEHOLDER_VERSION}-${rest}"
echo "Renaming $wheel_filename → $new_name"
mv "$wheel" "wheels/${new_name}"
done
- name: Inspect wheels directory after renaming files
run: ls -alFR wheels/
- name: Create release and upload artifacts
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment