Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Release

on:
push:
workflow_run:
workflows: [CI]
types: [completed]
branches: [main]

concurrency:
Expand All @@ -12,7 +14,7 @@ jobs:
release:
name: Bump version and publish release
runs-on: ubuntu-latest
if: "!startsWith(github.event.head_commit.message, 'chore: bump version')"
if: "github.event.workflow_run.conclusion == 'success' && !startsWith(github.event.workflow_run.head_commit.message, 'chore: bump version')"

permissions:
contents: write
Expand All @@ -32,8 +34,10 @@ jobs:
# ------------------------------------------------------------------ #
- name: Determine bump type
id: bump
env:
MSG_RAW: ${{ github.event.workflow_run.head_commit.message }}
run: |
MSG=$(echo "${{ github.event.head_commit.message }}" | head -1)
MSG=$(echo "$MSG_RAW" | head -1)
if echo "$MSG" | grep -qiE "(BREAKING CHANGE|^[a-z]+(\([^)]*\))?!:)"; then
echo "type=major" >> "$GITHUB_OUTPUT"
elif echo "$MSG" | grep -qE "^feat(\([^)]*\))?:"; then
Expand Down
Loading