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 }}