From b56794e5f6c80e93d44424470a85fbaa5a481691 Mon Sep 17 00:00:00 2001 From: Moritz Lerch Date: Sun, 30 Jul 2023 23:22:23 +0200 Subject: [PATCH] ci: publish to pypi --- .github/workflows/publish.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..a499d45 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,30 @@ +name: Publish ${package_name} to PyPI + +on: + push: + tags: + - "v*" +jobs: + publish-pypi: + name: Build and publish to PyPI + runs-on: ubuntu-latest + + steps: + - name: Checkout source + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: "3.x" + + - name: Build source and wheel distributions + run: | + python -m pip install --upgrade build twine + python -m build + twine check --strict dist/* + - name: Publish distribution to PyPI + uses: pypa/gh-action-pypi-publish@ae63f3323ae7b31c08f2805b18056cbf132ce478 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }}