-
Notifications
You must be signed in to change notification settings - Fork 80
47 lines (41 loc) · 1.41 KB
/
release-nightly.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
name: Nightly packages
on:
pull_request: # this shall test only the part of workflow before publishing
branches: [main, "release/*"]
types: [opened, reopened, ready_for_review, synchronize]
paths:
- ".github/workflows/release-nightly.yml"
schedule:
- cron: "0 0 * * 0" # on Sundays
workflow_dispatch: {}
defaults:
run:
shell: bash
jobs:
releasing-nightly:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: python -m pip install --user --upgrade setuptools wheel
- name: Build package
env:
CONVERT_VERSION2NIGHTLY: "1"
run: python setup.py sdist bdist_wheel
# We do this, since failures on test.pypi aren't that bad
- name: Publish to Test PyPI
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
uses: pypa/gh-action-pypi-publish@v1.8.14
with:
user: __token__
password: ${{ secrets.test_pypi_password }}
repository_url: https://test.pypi.org/legacy/
- name: Publish distribution 📦 to PyPI
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
uses: pypa/gh-action-pypi-publish@v1.8.14
with:
user: __token__
password: ${{ secrets.pypi_password }}