From 4adffcbea15d94796be1c0c3750b2f21b580dc88 Mon Sep 17 00:00:00 2001 From: santosh dasari <74972011+santoshdasa12345@users.noreply.github.com> Date: Wed, 10 May 2023 16:00:23 +0100 Subject: [PATCH] publish-pypi --- .github/workflows/publish-pypi.yml | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/publish-pypi.yml diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml new file mode 100644 index 0000000..0fa03ab --- /dev/null +++ b/.github/workflows/publish-pypi.yml @@ -0,0 +1,37 @@ +name: Publish to PyPI +on: + release: + types: [published] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-python@v3 + with: + python-version: 3.11 + + - run: | + pip install build + python -m build + + - uses: actions/upload-artifact@v3 + with: + path: ./dist + + pypi-publish: + needs: ["build"] + environment: "publish-pypi" + + name: upload release to PyPI + runs-on: ubuntu-latest + permissions: + id-token: write + steps: + - uses: actions/download-artifact@v3 + + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages_dir: artifact/