From 0a907b666b18d26e46df65096ac3313cecc58712 Mon Sep 17 00:00:00 2001 From: Chris Berg Date: Tue, 24 Sep 2024 15:35:42 -0700 Subject: [PATCH] feat: supporting release events --- action.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/action.yml b/action.yml index 5381fad..7fe9075 100644 --- a/action.yml +++ b/action.yml @@ -47,6 +47,15 @@ runs: https://api.github.com/repos/${{ github.repository }}/commits/${{ github.event.after }}/pulls \ | jq .[0].number ) + elif [ ${{ github.event_name }} == 'release' ] + then + echo "Event type: release" + pr=$(\ + curl -sL -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ inputs.token }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + https://api.github.com/repos/${{ github.repository }}/commits/${{ github.event.after }}/pulls \ + | jq .[0].number + ) if [ -z "${pr}" ] then