diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1829de41..3320cf96 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,34 +1,47 @@ name: Build Wheel and Release on: + pull_request: + branches: + - main push: tags: - v* jobs: - pypi-publish: - name: upload release to PyPI - if: github.repository_owner == 'numpy' && startsWith(github.ref, 'refs/tags/v') && github.actor == 'jarrodmillman' && always() + sdist_wheel: + name: sdist and wheels runs-on: ubuntu-latest - # Specifying a GitHub environment is optional, but strongly encouraged - environment: release - permissions: - # IMPORTANT: this permission is mandatory for trusted publishing - id-token: write steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/setup-python@v5 - name: Install Python with: python-version: "3.12" - - name: Build wheels run: | git clean -fxd pip install -U build twine wheel python -m build --sdist --wheel + - run: twine check --strict dist/* + - uses: actions/upload-artifact@v4 + with: + name: dist + path: dist - - name: Publish package distributions to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 + pypi-publish: + needs: sdist_wheel + name: upload release to PyPI + if: github.repository_owner == 'numpy' && startsWith(github.ref, 'refs/tags/v') && github.actor == 'jarrodmillman' && always() + runs-on: ubuntu-latest + # Specifying a GitHub environment is optional, but strongly encouraged + environment: release + permissions: + # IMPORTANT: this permission is mandatory for trusted publishing + id-token: write + steps: + - uses: actions/download-artifact@v4 + with: + name: dist + path: dist + - uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/README.rst b/README.rst index 87661b6f..354a79d9 100644 --- a/README.rst +++ b/README.rst @@ -4,7 +4,6 @@ numpydoc -- Numpy's Sphinx extensions .. image:: https://readthedocs.org/projects/numpydoc/badge/?version=latest :alt: Documentation Status - :scale: 100% :target: https://numpydoc.readthedocs.io/en/latest/ .. image:: https://codecov.io/gh/numpy/numpydoc/branch/main/graph/badge.svg