From 0859f4f3e10a622acb36f8aeb857c136f8590e1d Mon Sep 17 00:00:00 2001 From: matej-almasi <120648152+matej-almasi@users.noreply.github.com> Date: Tue, 10 Dec 2024 19:33:36 +0100 Subject: [PATCH] Fix incorrect trigger of post-release workflow (#7) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Matej Almasi <¨almasi.mato@gmail.com¨> --- .github/workflows/post-release.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/post-release.yml b/.github/workflows/post-release.yml index bbd264c..a3de204 100644 --- a/.github/workflows/post-release.yml +++ b/.github/workflows/post-release.yml @@ -15,11 +15,9 @@ # https://eugene-babichenko.github.io/blog/2020/05/09/github-actions-cross-platform-auto-releases/ # https://github.com/crate-ci/typos -name: post-release +name: Post release on: push: - branches: - - main tags: - "v*" @@ -28,6 +26,8 @@ env: jobs: publish-to-crates: + if: github.ref == 'refs/heads/main' + name: Publish to crates.io runs-on: ubuntu-latest @@ -45,6 +45,8 @@ jobs: run: cargo publish create-release: + if: github.ref == 'refs/heads/main' + name: Create release runs-on: ubuntu-latest