From 3d6bf5919755f4c8617b80bed1ec2c2811e75a44 Mon Sep 17 00:00:00 2001 From: Vanessa Stoiber <52395160+dvvanessastoiber@users.noreply.github.com> Date: Thu, 28 Nov 2024 15:13:55 +0100 Subject: [PATCH] Update release.yml --- .github/workflows/release.yml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9fade9609..40107f2e3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Create a new release PR +name: Create a new release on: workflow_dispatch: @@ -7,10 +7,25 @@ on: type: string description: 'The next version to release' required: true + pull_request: + types: [closed] + branches: + - 'main' jobs: - release: + create_release_pr: + if: ${{ github.event_name == 'workflow_dispatch' }} uses: datavisyn/github-workflows/.github/workflows/release-source.yml@main secrets: inherit with: - release_version: ${{ inputs.release_version }} \ No newline at end of file + release_version: ${{ inputs.release_version }} + + post_merge_release: + if: ${{ github.event_name == 'pull_request' && github.event.pull_request.merged == true && startsWith(github.event.pull_request.title, 'Release') }} + uses: datavisyn/github-workflows/.github/workflows/release-post-merge.yml@main + secrets: inherit + with: + pr_title: ${{ github.event.pull_request.title }} + pr_number: ${{ github.event.pull_request.number }} + repository_owner: ${{ github.repository_owner }} + repository_name: ${{ github.event.repository.name }}