chore(workflows): refine branch handling in release process
All checks were successful
Test http-kernel / Run Tests (pull_request) Successful in 16s
Auto Changelog & Release / detect-version-change (push) Has been skipped
Auto Changelog & Release / changelog-only (push) Has been skipped
Auto Changelog & Release / release (push) Has been skipped

- 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
This commit is contained in:
2025-05-10 16:34:19 +02:00
parent 3f114bb68d
commit 8f94cc915c

View File

@@ -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