From fc7468810620208245b9d1e43b721b4b26756645 Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Wed, 8 Jan 2025 23:39:34 -0500 Subject: [PATCH] Fix CI to not run publish all the time --- .github/workflows/publish.yml | 2 +- .github/workflows/release.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7333d62aff..d8602f9ad9 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,7 +11,7 @@ env: jobs: cargo-publish: runs-on: ubuntu-latest - if: ${{ (github.event.workflow_run.conclusion == 'success') && (github.event.workflow.name == 'Release') }} + if: ${{ !github.event.pull_request && (github.event.workflow_run.conclusion == 'success') && (github.event.workflow.name == 'Release') }} steps: - name: Print workflow event name run: echo "${{ github.event.workflow.name }}" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5df0c7b1c1..3ba1e6cef9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,6 +40,7 @@ permissions: # will be marked as a prerelease. on: pull_request: + branches: [ "main" ] push: tags: - '**[0-9]+.[0-9]+.[0-9]+*'