From 16c1c1817be75ace1706398a7d6a0df20fa216fa Mon Sep 17 00:00:00 2001 From: Julien Seguinot Date: Fri, 16 Dec 2022 11:26:17 +0100 Subject: [PATCH] Add Github workflow for PyPI release. (#50) * Add Github workflow for PyPI release. * Clean up workflow. * Document changes in whatsnew. --- .github/workflows/pypi.yaml | 25 +++++++++++++++++++++++++ doc/whatsnew.rst | 1 + 2 files changed, 26 insertions(+) create mode 100644 .github/workflows/pypi.yaml diff --git a/.github/workflows/pypi.yaml b/.github/workflows/pypi.yaml new file mode 100644 index 0000000..53f3528 --- /dev/null +++ b/.github/workflows/pypi.yaml @@ -0,0 +1,25 @@ +name: PyPI + +on: + release: + types: [published] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout source + uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' + - name: Build distributions + run: | + python -m pip install --upgrade build + python -m build + - name: Publish on PyPI + uses: pypa/gh-action-pypi-publish@v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/doc/whatsnew.rst b/doc/whatsnew.rst index 432a09f..95dca5d 100644 --- a/doc/whatsnew.rst +++ b/doc/whatsnew.rst @@ -45,6 +45,7 @@ Internal changes - Add very simple tests for all plot methods (:issue:`37`, pull:`49`). - Compute code coverage and upload to codecov.io (:issue:`38`, pull:`47`). - Add docs, tests and codecov badges in readme file (:pull:`48`). +- Add automatic delivery on PyPI (:issue:`39`, :pull:`50`). .. _v0.2.1: