From aac117f7b3f20ee6a7b56a053e509544ee1f40c8 Mon Sep 17 00:00:00 2001 From: Justin Spahr-Summers Date: Thu, 21 Nov 2024 21:56:42 +0000 Subject: [PATCH] Only publish on release --- .github/workflows/python.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 51c61702..a1edc0c9 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -60,12 +60,15 @@ jobs: path: src/${{ matrix.package }}/dist/ publish: + runs-on: ubuntu-latest needs: [build, detect-packages] + if: github.event_name == 'release' + strategy: matrix: package: ${{ fromJson(needs.detect-packages.outputs.packages) }} name: Publish ${{ matrix.package }} - runs-on: ubuntu-latest + environment: release permissions: id-token: write # Required for trusted publishing