-
Notifications
You must be signed in to change notification settings - Fork 27.2k
31 lines (30 loc) · 1.16 KB
/
notify_release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# A workflow runs when a release is published, dispatches a new event to the vercel/turbo
# to notify its release. Turbopack, and other integration workflow will subscribe to this event.
name: Notify new Next.js release
on:
release:
types: [published]
jobs:
notify:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7
id: notify-new-release
with:
result-encoding: string
retries: 3
retry-exempt-status-codes: 400,401
# Default github token cannot dispath events to the remote repo, it should be
# a PAT with access to contenst:read&write + metadata:read.
github-token: ${{ secrets.TURBOPACK_TEST_TOKEN }}
# Note `event_type` and `client_payload` are contract between vercel/turbo,
# if these need to be changed both side should be updated accordingly.
script: |
github.request('POST /repos/{owner}/{repo}/dispatches', {
owner: 'vercel',
repo: 'turbo',
event_type: 'nextjs-release-published',
client_payload: {
version: context.ref
}
})