Upload nightly wheels #449
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Upload nightly wheels | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
cron: | |
runs-on: ubuntu-latest | |
if: github.repository == 'pydata/xarray' | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install build twine | |
- name: Build tarball and wheels | |
run: | | |
git clean -xdf | |
git restore -SW . | |
python -m build | |
- name: Check built artifacts | |
run: | | |
python -m twine check --strict dist/* | |
pwd | |
if [ -f dist/xarray-0.0.0.tar.gz ]; then | |
echo "❌ INVALID VERSION NUMBER" | |
exit 1 | |
else | |
echo "✅ Looks good" | |
fi | |
- name: Upload wheel | |
uses: scientific-python/upload-nightly-action@b67d7fcc0396e1128a474d1ab2b48aa94680f9fc # 0.5.0 | |
with: | |
anaconda_nightly_upload_token: ${{ secrets.ANACONDA_NIGHTLY }} | |
artifacts_path: dist |