name: Publish build to PyPI on: push: tags: - 'v*' jobs: test: uses: coloursofnoise/mons/.github/workflows/test.yml@main build-and-publish: needs: test runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 with: fetch-depth: 0 - name: Set up Python 3.11 uses: actions/setup-python@v2 with: python-version: '3.11' - name: Install dependencies run: | python -m pip install --upgrade pip python -m pip install . python -m pip install -r requirements-dev.txt - name: Generate packaged manual pages run: sphinx-build -b man -W docs mons/man -d docs/_build env: TZ: UTC - name: Install pypa/build run: python -m pip install build --user - name: Build wheel and source tarball run: python -m build --outdir dist/ . - name: Publish distribution to TestPyPI uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ password: ${{ secrets.TEST_PYPI_API_TOKEN }} repository_url: https://test.pypi.org/legacy/ - name: Publish distribution to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ password: ${{ secrets.PYPI_API_TOKEN }}