From 71ea4247b35dc4afe5090d3c6502bfa936b5a947 Mon Sep 17 00:00:00 2001 From: "Max P." Date: Sat, 10 May 2025 16:34:19 +0200 Subject: [PATCH] chore(workflows): refine branch handling in release process - Adjusts workflow to support pushes from all branches - Ensures main branch-specific conditions for version detection - Modifies changelog and release steps for non-main branch handling --- .gitea/workflows/release.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 0d55559..0486dd7 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -4,10 +4,12 @@ on: push: branches: - main + - '**' jobs: detect-version-change: runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main' outputs: version_changed: ${{ steps.check.outputs.version_changed }} steps: @@ -35,7 +37,7 @@ jobs: changelog-only: needs: detect-version-change - if: needs.detect-version-change.outputs.version_changed == 'false' + if: github.ref != 'refs/heads/main' || needs.detect-version-change.outputs.version_changed == 'false' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -75,12 +77,12 @@ jobs: echo "No changes to commit" else git commit -m "chore(changelog): update unreleased changelog" - git push origin main + git push origin "${GITHUB_REF##refs/heads/}" fi release: needs: detect-version-change - if: needs.detect-version-change.outputs.version_changed == 'true' + if: needs.detect-version-change.outputs.version_changed == 'true' && github.ref == 'refs/heads/main' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4