From 6d3004260f0d91ec6d4c9e35c5bfbd68bd4aea8a Mon Sep 17 00:00:00 2001 From: Chaminda Divitotawela Date: Thu, 7 Dec 2023 09:37:10 +1000 Subject: [PATCH] Workflow trigger on release Example workflow to run on when a release is created --- .github/workflows/release.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..1466a68 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,24 @@ +# Example trigger on release +name: release + +on: + # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release + release: + types: [published] + push: + branch: run-on-release + + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Event triggerred + run: echo "Event Name [${{ github.event_name }}]" + + - name: Default branch + run: echo "Default branch [${{ github.event.repository.default_branch }}]" + + - name: Run on release + if: ${{ github.event_name == 'release' }} + run: echo "Run this step on release"