From c2c4cda031fb27073e67e5f2bf756d241d248420 Mon Sep 17 00:00:00 2001 From: CBAI <7985170+carljbai@users.noreply.github.com> Date: Fri, 11 Oct 2024 16:46:58 -0400 Subject: [PATCH] move to oidc --- .github/workflows/pythonpublish.yml | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml index b5e1143..a158797 100644 --- a/.github/workflows/pythonpublish.yml +++ b/.github/workflows/pythonpublish.yml @@ -7,6 +7,14 @@ on: jobs: deploy: runs-on: ubuntu-latest + permissions: + # https://docs.pypi.org/trusted-publishers/using-a-publisher/ + # https://github.com/marketplace/actions/pypi-publish + # IMPORTANT: this permission is mandatory for trusted publishing + id-token: write + environment: + name: pypi + url: https://pypi.org/p/pkpass-olcf steps: - uses: actions/checkout@v1 - name: Set up Python @@ -17,10 +25,12 @@ jobs: run: | python -m pip install --upgrade pip pip install setuptools wheel twine - - name: Build and publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - python setup.py sdist bdist_wheel - twine upload dist/* + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + #- name: Build and publish + #env: + # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + # run: | + # python setup.py sdist bdist_wheel + # twine upload dist/* --verbose