Nightly packages #55
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: 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.12.2 | |
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.12.2 | |
with: | |
user: __token__ | |
password: ${{ secrets.pypi_password }} |