Skip to content

Commit f118c2c

Browse files
authored
ci: notify downstream repos on release (#59)
1 parent f0d2f9b commit f118c2c

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,34 @@ jobs:
5858
publish-mode: oidc
5959
build-command: |
6060
npm ci
61+
62+
# On a successful publish (optic publishes when its release PR merges into
63+
# main), tell downstream repos to fast-track the bump of this package, rather
64+
# than waiting for their daily Dependabot run. Receiver: digidem/comapeo-core-react-native.
65+
notify-downstream:
66+
needs: release
67+
if: >-
68+
needs.release.result == 'success' &&
69+
github.event_name == 'pull_request' &&
70+
github.event.pull_request.merged == true
71+
runs-on: ubuntu-latest
72+
strategy:
73+
fail-fast: false
74+
matrix:
75+
downstream:
76+
- owner: digidem
77+
repo: comapeo-core-react-native
78+
steps:
79+
- uses: actions/create-github-app-token@v3
80+
id: token
81+
with:
82+
app-id: ${{ vars.RELEASE_BOT_APP_ID }}
83+
private-key: ${{ secrets.RELEASE_BOT_PRIVATE_KEY }}
84+
owner: ${{ matrix.downstream.owner }}
85+
repositories: ${{ matrix.downstream.repo }}
86+
- env:
87+
GH_TOKEN: ${{ steps.token.outputs.token }}
88+
run: |
89+
gh api repos/${{ matrix.downstream.owner }}/${{ matrix.downstream.repo }}/dispatches \
90+
-f event_type=first-party-release \
91+
-f 'client_payload[package]=@comapeo/map-server'

0 commit comments

Comments
 (0)