From 88da46cdde17a22ccd3fad882f40ea5c9182cfcf Mon Sep 17 00:00:00 2001 From: mhdzumair Date: Sat, 31 Aug 2024 14:00:03 +0530 Subject: [PATCH] Add cd workflow for publishing to PyPi --- .github/workflows/cd.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/cd.yml diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000..2be3989 --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,24 @@ +name: Publish Python 🐍 distributions 📦 to PyPI + +on: + release: + types: [created] + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + - name: Install dependencies + run: | + pip install poetry + poetry build + - name: Build and publish + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }}