From 8d5f967b9dade7712184f6293b9429ccd4ddf0af Mon Sep 17 00:00:00 2001 From: Klaas Schoute Date: Mon, 29 May 2023 12:26:51 +0200 Subject: [PATCH] Start using PyPi trusted publishing (#399) --- .github/workflows/release.yaml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 51dd6e59..262af8e8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -15,6 +15,9 @@ jobs: release: name: Releasing to PyPi runs-on: ubuntu-latest + environment: release + permissions: + id-token: write steps: - name: โคต๏ธ Check out code from GitHub uses: actions/checkout@v3 @@ -40,12 +43,8 @@ jobs: poetry version --no-interaction "${version}" - name: ๐Ÿ— Build package run: poetry build --no-interaction - - name: ๐Ÿš€ Publish to PyPi - env: - PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} - run: | - poetry config pypi-token.pypi "${PYPI_TOKEN}" - poetry publish --no-interaction + - name: ๐Ÿš€ Publish package to PyPi + uses: pypa/gh-action-pypi-publish@release/v1 tweet: name: ๐Ÿฆ Tweet the release