Skip to content

Commit 9d67015

Browse files
Titus-von-Koellermatthewdouglas
authored andcommitted
tweak continuous release of main
1 parent 0c1a493 commit 9d67015

File tree

1 file changed

+14
-24
lines changed

1 file changed

+14
-24
lines changed

.github/workflows/python-package.yml

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -163,45 +163,35 @@ jobs:
163163
needs:
164164
- build-wheels
165165
steps:
166-
- name: Download artifacts to tmp directory
166+
- name: Download and rename artifacts
167167
uses: actions/download-artifact@v4
168168
with:
169169
path: tmp/
170170
pattern: "bdist_wheel_*"
171171
merge-multiple: true
172172
- name: Inspect tmp directory after downloading artifacts
173173
run: ls -alFR tmp/
174-
- name: Move and rename wheel files
174+
- name: Move and rename wheel files with pattern replacement
175175
run: |
176176
mkdir -p wheels/
177177
find tmp/ -type f -name '*.whl' -print0 | while IFS= read -r -d '' wheel; do
178178
wheel_filename=$(basename "$wheel")
179-
if [[ $wheel_filename == *linux*x86_64* ]]; then
180-
mv "$wheel" wheels/bnb-linux-x86_64.whl
181-
elif [[ $wheel_filename == *linux*aarch64* ]]; then
182-
mv "$wheel" wheels/bnb-linux-aarch64.whl
183-
elif [[ $wheel_filename == *macosx*x86_64* ]]; then
184-
mv "$wheel" wheels/bnb-macos-x86_64.whl
185-
elif [[ $wheel_filename == *macosx*arm64* ]]; then
186-
mv "$wheel" wheels/bnb-macos-arm64.whl
187-
elif [[ $wheel_filename == *win*amd64* ]]; then
188-
mv "$wheel" wheels/bnb-windows-x86_64.whl
189-
else
190-
echo "Unknown wheel format: $wheel_filename"
191-
exit 1
192-
fi
179+
# Remove the gith hash, e.g. `+1234567`, for a stable download link on the multi-backend pre-release
180+
cleaned_filename=$(echo "$wheel_filename" | sed -E 's/\+[0-9a-f]{7}-/-/g')
181+
mv "$wheel" "wheels/$cleaned_filename"
193182
done
194183
- name: Inspect wheels directory after renaming files
195184
run: ls -alFR wheels/
196185
- name: Create release and upload artifacts
197-
env:
198-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
199-
GITHUB_CONTINUOUS_RELEASE_TYPE: prerelease
200-
GITHUB_CONTINUOUS_RELEASE_TAG: continuous-release_main
201-
run: |
202-
wget -q https://github.com/TheAssassin/pyuploadtool/releases/download/continuous/pyuploadtool-x86_64.AppImage
203-
chmod +x pyuploadtool-x86_64.AppImage
204-
./pyuploadtool-x86_64.AppImage --appimage-extract-and-run wheels/*.whl
186+
uses: softprops/action-gh-release@v2.0.8
187+
with:
188+
files: wheels/*.whl
189+
prerelease: true
190+
name: Multi-Backend Preview
191+
tag_name: continuous-release_main
192+
make_latest: false
193+
draft: false
194+
target_commitish: ${{ github.sha }}
205195

206196
audit-wheels:
207197
needs: build-wheels

0 commit comments

Comments
 (0)