File tree 2 files changed +44
-0
lines changed 2 files changed +44
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Force Merge Canary Release PR
2
+
3
+ on : pull_request
4
+
5
+ # Limit the permissions of GITHUB_TOKEN for this
6
+ # workflow which is good practice.
7
+ permissions :
8
+ pull-requests : write
9
+
10
+ jobs :
11
+ force-merge-canary-release-pr :
12
+ runs-on : ubuntu-latest
13
+ # Validate the login, PR title, and the label to ensure the PR is
14
+ # from the release PR and prevent spoofing.
15
+ if : |
16
+ github.event.pull_request.user.login == 'vercel-release-bot' &&
17
+ github.event.pull_request.title == 'Version Packages (canary)' &&
18
+ contains(github.event.pull_request.labels.*.name, 'created-by: CI')
19
+ steps :
20
+ - name : Bypass required status checks and merge PR
21
+ run : gh pr merge --admin --squash "$PR_URL"
22
+ env :
23
+ PR_URL : ${{github.event.pull_request.html_url}}
24
+ GH_TOKEN : ${{secrets.GITHUB_TOKEN}}
Original file line number Diff line number Diff line change 1
1
name : Trigger Release (New)
2
2
3
3
on :
4
+ # Run every day at 23:15 UTC
5
+ schedule :
6
+ - cron : ' 15 23 * * *'
7
+ # Run manually
4
8
workflow_dispatch :
5
9
inputs :
6
10
releaseType :
7
11
description : Release Type
8
12
required : true
9
13
type : choice
14
+ # Cron job will run canary release
15
+ default : canary
10
16
options :
11
17
- canary
12
18
- stable
22
28
TURBO_VERSION : 2.3.3
23
29
NODE_LTS_VERSION : 20
24
30
31
+ # Limit the permissions of GITHUB_TOKEN for this
32
+ # workflow which is good practice.
33
+ permissions :
34
+ pull-requests : write
35
+
25
36
jobs :
26
37
start :
27
38
if : github.repository_owner == 'vercel'
@@ -99,7 +110,16 @@ jobs:
99
110
with :
100
111
version : pnpm ci:version
101
112
publish : pnpm ci:publish
113
+ title : Version Packages (${{ github.event.inputs.releaseType }})
114
+ commit : Version Packages (${{ github.event.inputs.releaseType }})
102
115
env :
103
116
GITHUB_TOKEN : ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}
104
117
NPM_TOKEN : ${{ secrets.NPM_TOKEN_ELEVATED }}
105
118
RELEASE_TYPE : ${{ github.event.inputs.releaseType }}
119
+
120
+ # Add label to verify the PR is created from this workflow.
121
+ - name : Add label to PR
122
+ if : steps.changesets.outputs.pullRequestNumber
123
+ run : ' gh pr edit ${{ steps.changesets.outputs.pullRequestNumber }} --add-label "created-by: CI"'
124
+ env :
125
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments