From a1e842cf95e5bd99a84e89d5eaaed42ff82f57eb Mon Sep 17 00:00:00 2001 From: Will Boyce Date: Fri, 7 Jan 2022 10:59:38 +0000 Subject: [PATCH] automatically publish tagged versions to pypi (#1075) --- .github/workflows/cd.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/cd.yaml diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml new file mode 100644 index 000000000..d18215a5d --- /dev/null +++ b/.github/workflows/cd.yaml @@ -0,0 +1,24 @@ +name: CD + +on: # yamllint disable-line rule:truthy + create: + tags: ["v?[0-9]+.[0-9]+.[0-9]+"] + +jobs: + publish: + runs-on: ubuntu-20.04 + steps: + - name: Checkout Code Repository + uses: actions/checkout@v2 + - name: Set up Python 3.9 + uses: actions/setup-python@v2 + with: + python-version: 3.9 + - name: Install `pypa/build` + run: python -m pip install build + - name: Build sdist and wheel + run: python -m build --sdist --wheel --outdir ./dist/ + - name: Publish package to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }}