Skip to content

Commit 518dfb8

Browse files
committed
fix: trigger publish pipeline after automated tag push
Add repository dispatch to ensure publish workflow runs when update-metadata pipeline pushes tags automatically.
1 parent e756efd commit 518dfb8

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

.github/workflows/publish-build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
push:
55
tags:
66
- 'v*'
7+
repository_dispatch:
8+
types: [publish-trigger]
79

810
jobs:
911
verify:

.github/workflows/update-metadata.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,14 @@ jobs:
7777
git tag "v${{ env.NEW_VERSION }}"
7878
git push origin main
7979
git push origin "v${{ env.NEW_VERSION }}"
80+
81+
- name: Trigger publish workflow
82+
if: steps.check_changes.outputs.changes == 'true'
83+
uses: peter-evans/repository-dispatch@v3
84+
with:
85+
token: ${{ secrets.GITHUB_TOKEN }}
86+
event-type: publish-trigger
87+
client-payload: '{"version": "${{ env.NEW_VERSION }}"}'
8088

8189
- name: Output summary
8290
if: steps.check_changes.outputs.changes == 'true'

0 commit comments

Comments
 (0)