From 0701c63c685f624dbac6cb340e49a5b020a974a6 Mon Sep 17 00:00:00 2001 From: Johannes Nussbaum <39048939+jnussbaum@users.noreply.github.com> Date: Thu, 6 Oct 2022 18:28:45 +0200 Subject: [PATCH] redefine conditions upon which a release-please is triggered --- .github/workflows/release-please.yml | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 97f039598..bc531ae87 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -1,30 +1,18 @@ name: Release-Please -# triggered when tests complete on main branch +# triggered when a PR is merged into main on: - workflow_run: - workflows: - - "Test" - branches: - - main + pull_request: types: - - completed + - closed jobs: - refused: - # Do not release if tests failed - runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'failure'}} - steps: - - id: refused_step - run: exit 1 - release-please: + if: github.event.pull_request.merged == true # Automate releases with Conventional Commit Messages as Pull Requests are merged into "main" branch name: Prepare next release runs-on: ubuntu-latest # release only if tests pass - if: ${{ github.event.workflow_run.conclusion == 'success'}} steps: - uses: GoogleCloudPlatform/release-please-action@v2 with: