From cf04667e3cdad9d56b8992b2120783c05f6154f0 Mon Sep 17 00:00:00 2001 From: Dhaiwat Date: Mon, 19 Feb 2024 00:21:21 -0600 Subject: [PATCH 1/3] chore: only run release workflow if tests pass --- .changeset/ninety-garlics-tell.md | 2 ++ .github/workflows/release.yaml | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 .changeset/ninety-garlics-tell.md diff --git a/.changeset/ninety-garlics-tell.md b/.changeset/ninety-garlics-tell.md new file mode 100644 index 00000000000..a845151cc84 --- /dev/null +++ b/.changeset/ninety-garlics-tell.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 12ffa58a3d1..4d81904e460 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,15 +1,17 @@ name: "Release" on: - push: - branches: - - master + workflow_run: + workflows: ["Test"] + types: + - completed concurrency: ${{ github.workflow }}-${{ github.ref }} jobs: release: name: "Release" + if: ${{ github.event.workflow_run.conclusion == 'success' && github.ref_name == 'master' }} runs-on: ubuntu-latest permissions: write-all environment: From 557404c7fa5ff6511267d221b5bb6409586f2778 Mon Sep 17 00:00:00 2001 From: Dhaiwat Date: Mon, 19 Feb 2024 00:51:16 -0600 Subject: [PATCH 2/3] better filter for branch --- .github/workflows/release.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4d81904e460..341c251f21e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -3,15 +3,15 @@ name: "Release" on: workflow_run: workflows: ["Test"] - types: - - completed + types: [completed] + branches: [master] concurrency: ${{ github.workflow }}-${{ github.ref }} jobs: release: name: "Release" - if: ${{ github.event.workflow_run.conclusion == 'success' && github.ref_name == 'master' }} + if: ${{ github.event.workflow_run.conclusion == 'success'}} runs-on: ubuntu-latest permissions: write-all environment: From ce45f6a106f2e0c23e1ff17e760a890e5490a7b7 Mon Sep 17 00:00:00 2001 From: Dhaiwat Date: Mon, 19 Feb 2024 07:10:53 -0600 Subject: [PATCH 3/3] Update release.yaml --- .github/workflows/release.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 341c251f21e..8f1a1694ee5 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -2,9 +2,9 @@ name: "Release" on: workflow_run: - workflows: ["Test"] - types: [completed] - branches: [master] + workflows: "Test" + types: completed + branches: master concurrency: ${{ github.workflow }}-${{ github.ref }}