43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
|
name: Nightly events
|
||
|
|
||
|
# https://jasonet.co/posts/scheduled-actions/
|
||
|
on:
|
||
|
schedule:
|
||
|
# At the end of every day
|
||
|
- cron: "0 0 * * *"
|
||
|
|
||
|
|
||
|
# based on https://github.com/pypa/gh-action-pypi-publish
|
||
|
jobs:
|
||
|
build-release:
|
||
|
runs-on: ubuntu-20.04
|
||
|
|
||
|
steps:
|
||
|
- uses: actions/checkout@v2
|
||
|
- uses: actions/setup-python@v2
|
||
|
with:
|
||
|
python-version: 3.7
|
||
|
|
||
|
- name: Install dependencies
|
||
|
run: >-
|
||
|
python -m pip install --user --upgrade setuptools wheel
|
||
|
- name: Build
|
||
|
run: >-
|
||
|
python .github/prepare_nightly.py
|
||
|
python setup.py sdist bdist_wheel
|
||
|
ls -lh dist/
|
||
|
|
||
|
# We do this, since failures on test.pypi aren't that bad
|
||
|
- name: Publish to Test PyPI
|
||
|
uses: pypa/gh-action-pypi-publish@master
|
||
|
with:
|
||
|
user: __token__
|
||
|
password: ${{ secrets.test_pypi_password }}
|
||
|
repository_url: https://test.pypi.org/legacy/
|
||
|
|
||
|
- name: Publish distribution 📦 to PyPI
|
||
|
uses: pypa/gh-action-pypi-publish@master
|
||
|
with:
|
||
|
user: __token__
|
||
|
password: ${{ secrets.pypi_password }}
|