-
Notifications
You must be signed in to change notification settings - Fork 607
58 lines (49 loc) · 1.5 KB
/
upload-nightly-release.yml
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
name: Build nightly PennyLane releases for TestPyPI
on:
schedule:
# Run every weekday at 5:50 EDT (cron is in UTC)
- cron: "50 9 * * 1-5"
workflow_dispatch:
jobs:
setup:
name: Setup the release
runs-on: ubuntu-latest
steps:
- name: Checkout PennyLane repo
uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.NIGHTLY_VERSION_UPDATE_DEPLOY_KEY }}
- name: Bump dev version
run: |
python $GITHUB_WORKSPACE/.github/workflows/scripts/set_nightly_version.py
- name: Push new version
run: |
git config --global user.email '${{ secrets.AUTO_UPDATE_VERSION_RINGO_EMAIL }}'
git config --global user.name "ringo-but-quantum"
git add $GITHUB_WORKSPACE/pennylane/_version.py
git commit -m "[no ci] bump nightly version"
git push
- name: Build wheels
run: |
python -m pip install build
python -m build --wheel --outdir dist
- uses: actions/upload-artifact@v4
with:
name: nightly-wheels
path: ./dist/*.whl
upload:
name: Upload wheels to TestPyPI
needs: [setup]
runs-on: ubuntu-latest
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- uses: actions/download-artifact@v4
with:
name: nightly-wheels
path: dist
- name: Upload wheels
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
packages-dir: dist