From 70e9705520f4efb865e57ef34205f081018d5f6e Mon Sep 17 00:00:00 2001 From: Spayralbe Date: Mon, 15 Apr 2024 22:28:10 +0200 Subject: [PATCH 1/2] Add permissions --- .github/workflows/publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0f3bbd6..c8eb01d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,6 +11,7 @@ jobs: permissions: # IMPORTANT: this permission is mandatory for trusted publishing id-token: write + contents: read steps: - uses: actions/checkout@v4 - name: Set up Python From cf421b6d865c09a3c96551523bf7b4fe07dd9e19 Mon Sep 17 00:00:00 2001 From: Spayralbe Date: Mon, 15 Apr 2024 23:40:48 +0200 Subject: [PATCH 2/2] Only trigger when publishing release --- .github/workflows/publish.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c8eb01d..5ada215 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,6 +1,8 @@ name: publish to PyPI 🐍 -on: release +on: + release: + types: [published] jobs: pypi-publish: