From 56d3fc27f1535f4587e4e3e4209a499777c9c9c8 Mon Sep 17 00:00:00 2001 From: Amit Sharma Date: Mon, 4 Dec 2023 21:59:58 +0530 Subject: [PATCH] updated python publish workflow to support pypi 2fa Signed-off-by: Amit Sharma --- .github/workflows/python-publish.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 1a48f90f9..887ea7ae4 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -6,12 +6,15 @@ name: Publish Package on: release: types: [created] + workflow_dispatch: jobs: deploy: - + name: Upload release to PyPI runs-on: ubuntu-latest - + environment: release + permissions: + id-token: write steps: - uses: actions/checkout@v4 @@ -35,4 +38,5 @@ jobs: run: | poetry-dynamic-versioning poetry build - poetry publish --username ${{ secrets.PYPI_USERNAME }} --password ${{ secrets.PYPI_PASSWORD }} + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1