Skip to content

Commit 2792f11

Browse files
authored
Merge pull request #265 from bgilbert/autobin
workflows: autodetect latest openslide-bin release
2 parents 7a7e70d + c46c953 commit 2792f11

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

.github/workflows/python.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,6 @@ jobs:
151151
name: Windows
152152
needs: pre-commit
153153
runs-on: windows-latest
154-
env:
155-
BIN_RELEASE: 20231011
156154
defaults:
157155
run:
158156
shell: bash
@@ -171,11 +169,18 @@ jobs:
171169
python -m pip install --upgrade pip
172170
pip install build flask pytest
173171
- name: Install OpenSlide
172+
env:
173+
GH_TOKEN: ${{ github.token }}
174174
run: |
175175
mkdir -p c:\\openslide
176176
cd c:\\openslide
177-
zipname=openslide-win64-${BIN_RELEASE}
178-
curl -LfO "https://github.com/openslide/openslide-bin/releases/download/v${BIN_RELEASE}/${zipname}.zip"
177+
release=$(gh release list -R openslide/openslide-bin -L 1 \
178+
--json tagName --exclude-drafts --exclude-pre-releases | \
179+
jq -r .[0].tagName | \
180+
tr -d v)
181+
zipname="openslide-win64-${release}"
182+
gh release download -R openslide/openslide-bin "v${release}" \
183+
--pattern "${zipname}.zip"
179184
7z x ${zipname}.zip
180185
echo "OPENSLIDE_PATH=c:\\openslide\\${zipname}\\bin" >> $GITHUB_ENV
181186
- name: Build wheel

0 commit comments

Comments
 (0)