From 4afb74f02f2acffc7b251c6d124d20212716e698 Mon Sep 17 00:00:00 2001 From: Bartosz Gadomski Date: Tue, 14 Jan 2025 14:14:50 +0100 Subject: [PATCH] update the release event types --- .github/workflows/deploy-to-wp-org.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy-to-wp-org.yml b/.github/workflows/deploy-to-wp-org.yml index a69e90f54..be2d3c547 100644 --- a/.github/workflows/deploy-to-wp-org.yml +++ b/.github/workflows/deploy-to-wp-org.yml @@ -7,10 +7,14 @@ on: # In case of a pre-release, the action will not commit to WP.org (dry-run). However, it will still # create a zip file and upload it to the release. Note that a pre-release (release candidate) # should not be changed to a release but rather a new release should be created. + # + # The "prereleased" type will not trigger for pre-releases published from draft releases, but + # the "published" type will trigger. Since we want a workflow to run when stable and pre-releases + # publish, we subscribe to "published" instead of "released" and "prereleased". + # + # See: https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#release release: - types: - - released - - prereleased + types: [ published ] jobs: lint_and_test: