From fc578bcc6a05d9dbf129778c229f82b5b7bee8ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Gr=C3=B6nholm?= Date: Sun, 30 Jul 2023 01:45:29 +0300 Subject: [PATCH] Switched to trusted publishing --- .github/workflows/publish.yml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4b87040..94b4daf 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,8 +9,9 @@ on: - "[0-9]+.[0-9]+.[0-9]+rc[0-9]+" jobs: - publish: + build: runs-on: ubuntu-latest + environment: release steps: - uses: actions/checkout@v3 - name: Set up Python @@ -20,8 +21,21 @@ jobs: - name: Install dependencies run: pip install build - name: Create packages - run: python -m build -s -w . + run: python -m build + - name: Archive packages + uses: actions/upload-artifact@v3 + with: + name: dist + path: dist + + publish: + needs: build + runs-on: ubuntu-latest + environment: release + permissions: + id-token: write + steps: + - name: Retrieve packages + uses: actions/download-artifact@v3 - name: Upload packages uses: pypa/gh-action-pypi-publish@release/v1 - with: - password: ${{ secrets.pypi_token }}