Skip to content

ci: Only run PyPI on master (to not spam contributors with failures),… #132

ci: Only run PyPI on master (to not spam contributors with failures),…

ci: Only run PyPI on master (to not spam contributors with failures),… #132

Workflow file for this run

name: Publish to PyPI
on:
push:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- run: pip install --upgrade build sphinx
- run: sphinx-build -b man docs man
- run: python -m build --sdist --wheel
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
skip-existing: true
- name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1