Repository navigation
69 lines (58 loc) · 1.86 KB
/
Copy pathnightlies.yml
File metadata and controls
69 lines (58 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Upload nightly wheels to Anaconda Cloud
on:
# Run daily at 2:34 UTC to upload nightly wheels to Anaconda Cloud
schedule:
- cron: "34 2 * * *"
# Run on demand with workflow dispatch
workflow_dispatch:
permissions:
actions: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_wheel:
name: Build and upload wheel
if: github.repository_owner == 'pybind'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v10.2.0
- name: Build SDist and wheels
run: |
uv tool install nox
nox -s build
nox -s build_global
- uses: actions/upload-artifact@v7
with:
name: Packages
path: dist/*
upload_nightly_wheels:
name: Upload nightly wheels to Anaconda Cloud
if: github.repository_owner == 'pybind'
needs: [build_wheel]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v8
with:
name: Packages
path: dist
- name: List wheel to be deployed
run: ls -lha dist/*.whl
# A final version would shadow the PyPI release with a master snapshot
- name: Require a development version
run: |
for whl in dist/*.whl; do
if ! basename "$whl" | grep -Eq '^[^-]+-[0-9.]+(a|b|rc|\.dev)[0-9]+-'; then
echo "::error::$whl is not a prerelease; bump master to a development version"
exit 1
fi
done
- name: Upload wheel to Anaconda Cloud as nightly
uses: scientific-python/upload-nightly-action@16fa02eacee1655195143de09f03676e60ef2bf5 # 0.6.5
with:
artifacts_path: dist
anaconda_nightly_upload_token: ${{ secrets.ANACONDA_ORG_UPLOAD_TOKEN }}