updated python publish workflow to support pypi 2fa

Signed-off-by: Amit Sharma <amit_sharma@live.com>
This commit is contained in:
Amit Sharma 2023-12-04 21:59:58 +05:30 коммит произвёл Patrick Blöbaum
Родитель b3aaeb52f8
Коммит 56d3fc27f1
1 изменённых файлов: 7 добавлений и 3 удалений

10
.github/workflows/python-publish.yml поставляемый
Просмотреть файл

@ -6,12 +6,15 @@ name: Publish Package
on: on:
release: release:
types: [created] types: [created]
workflow_dispatch:
jobs: jobs:
deploy: deploy:
name: Upload release to PyPI
runs-on: ubuntu-latest runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@ -35,4 +38,5 @@ jobs:
run: | run: |
poetry-dynamic-versioning poetry-dynamic-versioning
poetry build 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