Skip to content

ci/cd: publishing nightly packages with devYYYYMMMDD #4

ci/cd: publishing nightly packages with devYYYYMMMDD

ci/cd: publishing nightly packages with devYYYYMMMDD #4

Workflow file for this run

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
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: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.test_pypi_password }}
repository_url: https://test.pypi.org/legacy/
- name: Publish distribution 📦 to PyPI
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.pypi_password }}