From 5f216adaea239fcd114c5c817ce51de98c809569 Mon Sep 17 00:00:00 2001 From: Sido Date: Wed, 25 Jun 2025 08:26:06 +0200 Subject: [PATCH] fix: fix release workflow --- .github/workflows/release.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 643a0e7..e1eb2d9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,15 +4,26 @@ on: push: tags: - 'v*' - branches: - - master jobs: build: runs-on: ubuntu-latest - steps: - uses: actions/checkout@v3 + - name: Check tag points to master + id: check_branch + run: | + commit_sha=$(git rev-parse HEAD) + main_sha=$(git rev-parse origin/master) + echo "tag_commit=$commit_sha" >> $GITHUB_OUTPUT + echo "master_commit=$main_sha" >> $GITHUB_OUTPUT + continue-on-error: false + + - name: Abort if tag is not on master + if: steps.check_branch.outputs.tag_commit != steps.check_branch.outputs.master_commit + run: | + exit 0 + - name: Make run: | make