From 266ad3b82f62225e0700d740a32430f42cd7393a Mon Sep 17 00:00:00 2001 From: Andrew Chou Date: Thu, 26 Sep 2024 13:30:23 -0400 Subject: [PATCH 1/4] chore: fix release workflow to run when using workflow dispatch --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 45bfc026d..c3871cd8d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ on: jobs: release: - if: github.event.pull_request.merged == true + if: ${{github.event.pull_request.merged == true || github.event.workflow}} runs-on: ubuntu-latest permissions: contents: write From eeda7275791c4cb80247b7cb2a0187d2d4c9ca36 Mon Sep 17 00:00:00 2001 From: Andrew Chou Date: Thu, 26 Sep 2024 13:35:45 -0400 Subject: [PATCH 2/4] use github.event_name field instead --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c3871cd8d..b8c2afd1d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ on: jobs: release: - if: ${{github.event.pull_request.merged == true || github.event.workflow}} + if: ${{github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'}} runs-on: ubuntu-latest permissions: contents: write From 417c5c9ece6d70607620b38a5d571f7fa93276bb Mon Sep 17 00:00:00 2001 From: Andrew Chou Date: Thu, 26 Sep 2024 13:43:14 -0400 Subject: [PATCH 3/4] switch order of checks --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b8c2afd1d..cc08b030b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ on: jobs: release: - if: ${{github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'}} + if: ${{github.event_name == 'workflow_dispatch' || github.event.pull_request.merged}} runs-on: ubuntu-latest permissions: contents: write From d66c0a87b4ee5bd3e47271b41c0ede211cf80f59 Mon Sep 17 00:00:00 2001 From: Andrew Chou Date: Thu, 26 Sep 2024 15:31:30 -0400 Subject: [PATCH 4/4] use Gregor's suggestion Co-authored-by: Gregor MacLennan --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cc08b030b..fbf34158a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ on: jobs: release: - if: ${{github.event_name == 'workflow_dispatch' || github.event.pull_request.merged}} + if: ${{github.event_name != 'pull_request' || github.event.pull_request.merged}} runs-on: ubuntu-latest permissions: contents: write