From 3b85b0ff0a0746a38cd3349ba8488264614c02be Mon Sep 17 00:00:00 2001 From: Adrian Damian Date: Thu, 28 Mar 2024 16:41:24 -0700 Subject: [PATCH] Changed pypi publishing --- .github/workflows/cibuild.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cibuild.yml b/.github/workflows/cibuild.yml index 22f31344..702e6b65 100644 --- a/.github/workflows/cibuild.yml +++ b/.github/workflows/cibuild.yml @@ -73,6 +73,9 @@ jobs: name: Build and publish to PyPI needs: style_n_coverage runs-on: ubuntu-latest + permissions: + # IMPORTANT: this permission is mandatory for trusted publishing + id-token: write if: contains(github.ref, '=') steps: - uses: actions/checkout@v2 @@ -96,11 +99,5 @@ jobs: cd ${{ env.repo_name }} python -m pip install --upgrade pip pip install setuptools wheel twine - - name: Build and publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_PUBLISH_USER }} - TWINE_PASSWORD: ${{ secrets.PYPI_PUBLISH_PWORD }} - run: | - cd ${{ env.repo_name }} - python setup.py sdist bdist_wheel - twine upload --skip-existing dist/* + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1