Skip to content

Commit 6790d08

Browse files
committed
Switch post-release to repository_dispatch trigger
The workflow_run event only provides head_branch (PR source branch), not the target branch. This caused git describe --tags to find wrong tags when releasing from non-main branches like 8.0-stable. Using repository_dispatch allows the release workflow to explicitly pass the target_branch to post-release, ensuring correct tag detection.
1 parent 05cce47 commit 6790d08

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

.github/workflows/post-release.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
name: Post Release
22

33
on:
4-
workflow_run:
5-
workflows: ["Publish Release"]
6-
types:
7-
- completed
4+
workflow_dispatch:
5+
inputs:
6+
target_branch:
7+
description: 'Target branch (e.g., main, 8.0-stable)'
8+
required: true
9+
default: 'main'
10+
type: string
11+
repository_dispatch:
12+
types: [post-release]
813

914
jobs:
10-
bump-dev-version:
11-
if: github.event.workflow_run.conclusion == 'success'
15+
post-release:
1216
uses: AlchemyCMS/.github/.github/workflows/post-release.yml@main
1317
with:
1418
version_file_path: lib/alchemy/devise/version.rb
19+
target_branch: ${{ github.event.client_payload.target_branch || inputs.target_branch }}
1520
secrets:
1621
app_id: ${{ vars.ALCHEMY_BOT_APP_ID }}
1722
app_private_key: ${{ secrets.ALCHEMY_BOT_APP_PRIVATE_KEY }}

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
uses: AlchemyCMS/.github/.github/workflows/release.yml@main
1414
with:
1515
version_file_path: lib/alchemy/devise/version.rb
16+
target_branch: ${{ github.event.pull_request.base.ref || github.ref_name }}
1617
secrets:
1718
app_id: ${{ vars.ALCHEMY_BOT_APP_ID }}
1819
app_private_key: ${{ secrets.ALCHEMY_BOT_APP_PRIVATE_KEY }}

0 commit comments

Comments
 (0)