Skip to content
This repository was archived by the owner on Apr 18, 2025. It is now read-only.

Commit 90207b3

Browse files
authored
Merge pull request #406 from blocto/feat/trigger-example-repo
feat: trigger example github action
2 parents 508ca0b + 06392fe commit 90207b3

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/publish.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,18 @@ jobs:
3131
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3232
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3333
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
34+
35+
- name: Set version from publishedPackages
36+
id: setVersion
37+
if: steps.changesets.outputs.published == 'true'
38+
env:
39+
PACKAGE_VERSION: ${{ steps.changesets.outputs.publishedPackages }}
40+
run: echo "PACKAGE_VERSION=$(echo $PACKAGE_VERSION | jq -r '.[0].version')" >> $GITHUB_OUTPUT
41+
42+
- name: Trigger example repo github action
43+
if: steps.changesets.outputs.published == 'true'
44+
run: |
45+
curl -H "Authorization: Bearer ${{ secrets.DEV_GITHUB_TOKEN }}" \
46+
-H 'Accept: application/vnd.github.everest-preview+json' \
47+
"https://api.github.com/repos/blocto/blocto-sdk-examples/dispatches" \
48+
-d '{"event_type": "update-package", "client_payload": {"version": "${{ steps.setVersion.outputs.PACKAGE_VERSION }}" }}'

0 commit comments

Comments
 (0)