Skip to content

[ci]: app-based release workflow - #93245

Merged
ztanner merged 4 commits into
canaryfrom
release-app-dry-run-with-writes/new-release-flow
Apr 27, 2026
Merged

ztanner merged 4 commits into
canaryfrom
release-app-dry-run-with-writes/new-release-flow

Conversation

@ztanner

@ztanner ztanner commented Apr 25, 2026 •

Copy link
Copy Markdown
Contributor

Moves all release workflows off of a GH PAT and uses an app with a short-lived token instead.

Test Plan:
Dry run here.

However, this workflow is blocked until we figure out commit signing for the bot app. Some options:

  • The bot account generates a signing key and we use it in CI (not great, bypasses the app)
  • The org bypasses signature verification for the bot user (also not great, requires an exemption rule)
  • We need to rework the commit step so Lerna does not do the push, and instead trigger it via the app + GH API. This seems like the best option, will be added in a follow-up PR.

Note: create-release-branch workflow is broken in its current form, as we will not be restoring administrator privileges to adjust environment settings. This will become a manual step in the future.

@github-actions github-actions Bot added the created-by: Next.js team PRs by the Next.js team. label Apr 25, 2026
@ztanner
ztanner marked this pull request as ready for review April 25, 2026 16:28
@ztanner
ztanner requested review from eps1lon and ijjk April 25, 2026 16:29
@github-actions

github-actions Bot commented Apr 25, 2026 •

Copy link
Copy Markdown
Contributor

Tests Passed

Commit: fca9c6e

@github-actions

github-actions Bot commented Apr 25, 2026 •

Copy link
Copy Markdown
Contributor

Stats from current PR

✅ No significant changes detected

📊 All Metrics
📖 Metrics Glossary

Dev Server Metrics:

  • Listen = TCP port starts accepting connections
  • First Request = HTTP server returns successful response
  • Cold = Fresh build (no cache)
  • Warm = With cached build artifacts

Build Metrics:

  • Fresh = Clean build (no .next directory)
  • Cached = With existing .next directory

Change Thresholds:

  • Time: Changes < 50ms AND < 10%, OR < 2% are insignificant
  • Size: Changes < 1KB AND < 1% are insignificant
  • All other changes are flagged to catch regressions

⚡ Dev Server

Metric Canary PR Change Trend
Cold (Listen) 812ms 813ms ✓ ██▅▁▅
Cold (Ready in log) 795ms 803ms ✓ ▁▁█▅▇
Cold (First Request) 1.297s 1.325s ✓ ▁▂█▅▆
Warm (Listen) 812ms 813ms ✓ ▅█▅▁▁
Warm (Ready in log) 792ms 802ms ✓ ▁▁█▇█
Warm (First Request) 610ms 628ms ✓ ▁▂█▇█
📦 Dev Server (Webpack) (Legacy)

📦 Dev Server (Webpack)

Metric Canary PR Change Trend
Cold (Listen) 812ms 811ms ✓ ▁▆█▆▃
Cold (Ready in log) 781ms 782ms ✓ ▅▄▁▆█
Cold (First Request) 3.189s 3.211s ✓ ▄▇▁██
Warm (Listen) 812ms 812ms ✓ ▅███▁
Warm (Ready in log) 780ms 781ms ✓ ▄▁▁▇█
Warm (First Request) 3.219s 3.229s ✓ ▁▂▁█▄

⚡ Production Builds

Metric Canary PR Change Trend
Fresh Build 5.157s 5.175s ✓ ▁▂█▅▄
Cached Build 4.934s 5.131s ✓ ▁▃█▇▆
📦 Production Builds (Webpack) (Legacy)

📦 Production Builds (Webpack)

Metric Canary PR Change Trend
Fresh Build 23.629s 23.882s ✓ ▄▂▁▇█
Cached Build 23.567s 23.758s ✓ ▃▃▁▅█
node_modules Size 495 MB 495 MB ✓ ▁▆███
📦 Bundle Sizes

Bundle Sizes

⚡ Turbopack

Client

Main Bundles
Canary PR Change
01-6_54ba0k0y.js gzip 154 B N/A -
0944qdqmn3k_9.js gzip 155 B N/A -
0cz1d0mv5g_q7.js gzip 39.4 kB 39.4 kB ✓
0f-q8zzucdwc3.js gzip 65.6 kB N/A -
0fli3_wppnim5.js gzip 12.9 kB N/A -
0kb7_ep3r1z0_.js gzip 10.1 kB N/A -
0kw8xgqdrilf6.js gzip 8.56 kB N/A -
0ojkk2e654xsc.js gzip 8.59 kB N/A -
0wxpyd8r-vipl.js gzip 1.47 kB N/A -
0xy2fhla48_rd.js gzip 9.24 kB N/A -
10wqsvi2mgfmi.js gzip 9.82 kB N/A -
16lhqjoqbznyg.js gzip 220 B 220 B ✓
16vepdkipri3r.js gzip 8.51 kB N/A -
17n96uu6y1pxq.js gzip 8.6 kB N/A -
18y4_8-9or0mn.js gzip 8.51 kB N/A -
1e_5zkfvstg8q.js gzip 156 B N/A -
1ean4gq-z36r_.js gzip 157 B N/A -
1elt1qium-r2m.css gzip 115 B 115 B ✓
1gq145j3kps-h.js gzip 8.62 kB N/A -
1l8jy7nkljsgq.js gzip 168 B N/A -
1nsh-mbn0e-se.js gzip 8.56 kB N/A -
1rkrjccz_3xg0.js gzip 156 B N/A -
1tsrrp1tdngti.js gzip 13.3 kB N/A -
1wbblhm8kdg1d.js gzip 70.9 kB N/A -
1zhyi9g5kansf.js gzip 154 B N/A -
2__-e_ym8n788.js gzip 450 B N/A -
22o6xd9_ywdu6.js gzip 233 B N/A -
25n272-g99oa1.js gzip 7.61 kB N/A -
2faj3acmavn9n.js gzip 13.1 kB N/A -
2j1iz188xmk36.js gzip 160 B N/A -
2kvj8yrfznmwx.js gzip 5.69 kB N/A -
2qv7m7xjnokgr.js gzip 8.58 kB N/A -
2rbo30-4ny8mh.js gzip 154 B N/A -
3-80nr8h1pqjf.js gzip 160 B N/A -
342ijzvrpe53h.js gzip 2.29 kB N/A -
37ocxk3g_cpz4.js gzip 151 B N/A -
39h4zmi4mmh6g.js gzip 154 B N/A -
3k1k5gtofm6eq.js gzip 10.4 kB N/A -
3pbddvt7wc0kj.js gzip 155 B N/A -
3xq6of2nocani.js gzip 49.5 kB N/A -
42_02jza_7yny.js gzip 13.8 kB N/A -
turbopack-07..o2xo.js gzip 4.2 kB N/A -
turbopack-0m..myg7.js gzip 4.19 kB N/A -
turbopack-1c..00of.js gzip 4.19 kB N/A -
turbopack-1r..s_sf.js gzip 4.19 kB N/A -
turbopack-1v..5vq7.js gzip 4.19 kB N/A -
turbopack-2b..mxg5.js gzip 4.17 kB N/A -
turbopack-2e..6yca.js gzip 4.19 kB N/A -
turbopack-2t..xoml.js gzip 4.19 kB N/A -
turbopack-3a..t58w.js gzip 4.19 kB N/A -
turbopack-3a..0hdw.js gzip 4.18 kB N/A -
turbopack-3g..5zpf.js gzip 4.19 kB N/A -
turbopack-3i..m52b.js gzip 4.19 kB N/A -
turbopack-3o..se_6.js gzip 4.19 kB N/A -
turbopack-40..xhg5.js gzip 4.19 kB N/A -
046-fvruyfvai.js gzip N/A 169 B -
0arkbdqpxc37i.js gzip N/A 8.6 kB -
0bz-xifewa17d.js gzip N/A 8.63 kB -
0g-ogwxewd_j1.js gzip N/A 160 B -
0s0bk-xebp_os.js gzip N/A 156 B -
0tvekitj587fh.js gzip N/A 8.51 kB -
0unv38p29s65n.js gzip N/A 157 B -
0yvk6-wi8e9wh.js gzip N/A 13.3 kB -
1-jqyfc89tixo.js gzip N/A 1.46 kB -
10y3h86mnhs_2.js gzip N/A 10.4 kB -
12hxdatac0fxj.js gzip N/A 49.5 kB -
14t1kneseb8th.js gzip N/A 2.3 kB -
15sb1-dsqfk_j.js gzip N/A 8.59 kB -
1ab2xruymo-oj.js gzip N/A 449 B -
1cz0kmzuvr895.js gzip N/A 70.9 kB -
1dt49_v4y8lxb.js gzip N/A 13.8 kB -
1h1t76gcgnmyq.js gzip N/A 155 B -
1tu25qtsmfhar.js gzip N/A 9.82 kB -
1vein_gnv3mwr.js gzip N/A 8.56 kB -
1vmibvuhp1gey.js gzip N/A 13.1 kB -
1wzrm0xjjbzn5.js gzip N/A 10.1 kB -
1z3g0uaqtv9_3.js gzip N/A 8.56 kB -
2bi5hx402juv-.js gzip N/A 8.58 kB -
2ea61-cwip0fs.js gzip N/A 155 B -
2hy56297fog9u.js gzip N/A 8.52 kB -
2u_rpxq3tzytl.js gzip N/A 233 B -
2uvhnhmzheo1m.js gzip N/A 155 B -
2walynarwdt57.js gzip N/A 157 B -
35nh2lh_i5pyh.js gzip N/A 7.61 kB -
368lim5wq0o0r.js gzip N/A 12.9 kB -
3bm69wgosyjbs.js gzip N/A 155 B -
3drqjohogojbw.js gzip N/A 5.69 kB -
3f92jauar3qug.js gzip N/A 154 B -
3opggfrdxeld1.js gzip N/A 157 B -
3wpp8nvyoj121.js gzip N/A 9.24 kB -
3z6o-lnurdcrt.js gzip N/A 65.5 kB -
41depz8-5weoh.js gzip N/A 157 B -
42et4jzs606qh.js gzip N/A 159 B -
turbopack-06..mtbh.js gzip N/A 4.19 kB -
turbopack-0q..9btj.js gzip N/A 4.19 kB -
turbopack-0v..z0lv.js gzip N/A 4.19 kB -
turbopack-1d..v44x.js gzip N/A 4.19 kB -
turbopack-1j..eamo.js gzip N/A 4.19 kB -
turbopack-1k.._0js.js gzip N/A 4.18 kB -
turbopack-1n..ylp8.js gzip N/A 4.2 kB -
turbopack-1v..2v1p.js gzip N/A 4.19 kB -
turbopack-1x..d429.js gzip N/A 4.19 kB -
turbopack-2f..121d.js gzip N/A 4.17 kB -
turbopack-2t..zaj-.js gzip N/A 4.19 kB -
turbopack-3d..a_ql.js gzip N/A 4.19 kB -
turbopack-3n..guyc.js gzip N/A 4.19 kB -
turbopack-42.._fgr.js gzip N/A 4.18 kB -
Total 465 kB 465 kB ⚠️ +48 B

Server

Middleware
Canary PR Change
middleware-b..fest.js gzip 718 B 722 B ✓
Total 718 B 722 B ⚠️ +4 B
Build Details
Build Manifests
Canary PR Change
_buildManifest.js gzip 433 B 436 B ✓
Total 433 B 436 B ⚠️ +3 B

📦 Webpack

Client

Main Bundles
Canary PR Change
2637-HASH.js gzip 4.63 kB N/A -
7724.HASH.js gzip 169 B N/A -
8274-HASH.js gzip 61.4 kB N/A -
8817-HASH.js gzip 5.59 kB N/A -
c3500254-HASH.js gzip 62.8 kB N/A -
framework-HASH.js gzip 59.7 kB 59.7 kB ✓
main-app-HASH.js gzip 254 B 255 B ✓
main-HASH.js gzip 39.4 kB 39.4 kB ✓
webpack-HASH.js gzip 1.68 kB 1.68 kB ✓
5887-HASH.js gzip N/A 5.61 kB -
6522-HASH.js gzip N/A 60.7 kB -
6779-HASH.js gzip N/A 4.63 kB -
8854.HASH.js gzip N/A 169 B -
eab920f9-HASH.js gzip N/A 62.8 kB -
Total 236 kB 235 kB ✅ -652 B
Polyfills
Canary PR Change
polyfills-HASH.js gzip 39.4 kB 39.4 kB ✓
Total 39.4 kB 39.4 kB ✓
Pages
Canary PR Change
_app-HASH.js gzip 193 B 193 B ✓
_error-HASH.js gzip 182 B 182 B ✓
css-HASH.js gzip 333 B 334 B ✓
dynamic-HASH.js gzip 1.81 kB 1.8 kB ✓
edge-ssr-HASH.js gzip 255 B 255 B ✓
head-HASH.js gzip 353 B 349 B 🟢 4 B (-1%)
hooks-HASH.js gzip 384 B 382 B ✓
image-HASH.js gzip 581 B 581 B ✓
index-HASH.js gzip 260 B 259 B ✓
link-HASH.js gzip 2.52 kB 2.52 kB ✓
routerDirect..HASH.js gzip 316 B 318 B ✓
script-HASH.js gzip 386 B 386 B ✓
withRouter-HASH.js gzip 313 B 314 B ✓
1afbb74e6ecf..834.css gzip 106 B 106 B ✓
Total 7.99 kB 7.98 kB ✅ -10 B

Server

Edge SSR
Canary PR Change
edge-ssr.js gzip 126 kB 126 kB ✓
page.js gzip 274 kB 274 kB ✓
Total 400 kB 399 kB ✅ -646 B
Middleware
Canary PR Change
middleware-b..fest.js gzip 619 B 617 B ✓
middleware-r..fest.js gzip 156 B 156 B ✓
middleware.js gzip 44 kB 44.6 kB 🔴 +601 B (+1%)
edge-runtime..pack.js gzip 842 B 842 B ✓
Total 45.6 kB 46.2 kB ⚠️ +599 B
Build Details
Build Manifests
Canary PR Change
_buildManifest.js gzip 722 B 719 B ✓
Total 722 B 719 B ✅ -3 B
Build Cache
Canary PR Change
0.pack gzip 4.4 MB 4.4 MB 🟢 4.54 kB (0%)
index.pack gzip 113 kB 115 kB 🔴 +1.63 kB (+1%)
index.pack.old gzip 114 kB 113 kB ✓
Total 4.63 MB 4.63 MB ✅ -3.52 kB

🔄 Shared (bundler-independent)

Runtimes
Canary PR Change
app-page-exp...dev.js gzip 348 kB 348 kB ✓
app-page-exp..prod.js gzip 193 kB 193 kB ✓
app-page-tur...dev.js gzip 348 kB 348 kB ✓
app-page-tur..prod.js gzip 193 kB 193 kB ✓
app-page-tur...dev.js gzip 344 kB 344 kB ✓
app-page-tur..prod.js gzip 191 kB 191 kB ✓
app-page.run...dev.js gzip 345 kB 345 kB ✓
app-page.run..prod.js gzip 191 kB 191 kB ✓
app-route-ex...dev.js gzip 77.3 kB 77.3 kB ✓
app-route-ex..prod.js gzip 52.8 kB 52.8 kB ✓
app-route-tu...dev.js gzip 77.4 kB 77.4 kB ✓
app-route-tu..prod.js gzip 52.8 kB 52.8 kB ✓
app-route-tu...dev.js gzip 77 kB 77 kB ✓
app-route-tu..prod.js gzip 52.5 kB 52.5 kB ✓
app-route.ru...dev.js gzip 76.9 kB 76.9 kB ✓
app-route.ru..prod.js gzip 52.5 kB 52.5 kB ✓
dist_client_...dev.js gzip 324 B 324 B ✓
dist_client_...dev.js gzip 326 B 326 B ✓
dist_client_...dev.js gzip 318 B 318 B ✓
dist_client_...dev.js gzip 317 B 317 B ✓
pages-api-tu...dev.js gzip 44.2 kB 44.2 kB ✓
pages-api-tu..prod.js gzip 33.7 kB 33.7 kB ✓
pages-api.ru...dev.js gzip 44.2 kB 44.2 kB ✓
pages-api.ru..prod.js gzip 33.7 kB 33.7 kB ✓
pages-turbo....dev.js gzip 53.6 kB 53.6 kB ✓
pages-turbo...prod.js gzip 39.3 kB 39.3 kB ✓
pages.runtim...dev.js gzip 53.6 kB 53.6 kB ✓
pages.runtim..prod.js gzip 39.3 kB 39.3 kB ✓
server.runti..prod.js gzip 63.1 kB 63.1 kB ✓
Total 3.08 MB 3.08 MB ✓
📎 Tarball URL
https://vercel-packages.vercel.app/next/commits/fca9c6ef55f1f266991b196832962c16bea4972c/next

Commit: fca9c6e

@eps1lon eps1lon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to rework the commit step so Lerna does not do the push, and instead trigger it via the app + GH API. This seems like the best option, will be added in a follow-up PR.

continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}
GH_TOKEN: ${{ steps.release-app-token.outputs.token }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thought for a second that this was the bug we sometimes saw but it shouldn't matter. GH_TOKEN is preferred though if GITHUB_TOKEN is also set globally: https://cli.github.com/manual/gh_help_environment

- name: Get commit of the latest tag
run: echo "LATEST_TAG_COMMIT=$(git rev-list -n 1 $(git describe --tags --abbrev=0))" >> $GITHUB_ENV
run: |
git fetch --tags --force --deepen=1000 origin

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kinda shocked we always had fewer than 25 (fetch depth) commits between releases

@ztanner
ztanner merged commit e69de2f into canary Apr 27, 2026
185 checks passed
@ztanner
ztanner deleted the release-app-dry-run-with-writes/new-release-flow branch April 27, 2026 14:55
ztanner added a commit that referenced this pull request Apr 27, 2026
Stacked on #93245

Commit signing is required for anything that lands on `canary`. Our
previous workflow of using a PAT to push a commit no longer works, since
that would have been an unsigned commit.

In #93245 we switched to an app token for release workflow steps. This
continues by:

- Telling Lerna to bump packages but not commit
- Creating a signed commit with the staged changes via GitHub's API
- Then running the publish flow

Test Plan:
Dry run
[here](https://github.com/vercel/next.js/actions/runs/25001287978/job/73211826479)
Commit
[here](3a8456a)
ztanner added a commit that referenced this pull request Apr 27, 2026
Moves all release workflows off of a GH PAT and uses an app with a
short-lived token instead.

Test Plan:
Dry run
[here](https://github.com/vercel/next.js/actions/runs/24934593874).

However, this workflow is blocked until we figure out commit signing for
the bot app. Some options:
- The bot account generates a signing key and we use it in CI (not
great, bypasses the app)
- The org bypasses signature verification for the bot user (also not
great, requires an exemption rule)
- We need to rework the commit step so Lerna does not do the push, and
instead trigger it via the app + GH API. This seems like the best
option, will be added in a follow-up PR.

Note: `create-release-branch` workflow is broken in its current form, as
we will not be restoring administrator privileges to adjust environment
settings. This will become a manual step in the future.

(cherry picked from commit e69de2f)
ztanner added a commit that referenced this pull request Apr 27, 2026
Stacked on #93245

Commit signing is required for anything that lands on `canary`. Our
previous workflow of using a PAT to push a commit no longer works, since
that would have been an unsigned commit.

In #93245 we switched to an app token for release workflow steps. This
continues by:

- Telling Lerna to bump packages but not commit
- Creating a signed commit with the staged changes via GitHub's API
- Then running the publish flow

Test Plan:
Dry run
[here](https://github.com/vercel/next.js/actions/runs/25001287978/job/73211826479)
Commit
[here](3a8456a)

(cherry picked from commit 012fd7d)
ztanner added a commit that referenced this pull request Apr 27, 2026
Moves all release workflows off of a GH PAT and uses an app with a
short-lived token instead.

Test Plan:
Dry run
[here](https://github.com/vercel/next.js/actions/runs/24934593874).

However, this workflow is blocked until we figure out commit signing for
the bot app. Some options:
- The bot account generates a signing key and we use it in CI (not
great, bypasses the app)
- The org bypasses signature verification for the bot user (also not
great, requires an exemption rule)
- We need to rework the commit step so Lerna does not do the push, and
instead trigger it via the app + GH API. This seems like the best
option, will be added in a follow-up PR.

Note: `create-release-branch` workflow is broken in its current form, as
we will not be restoring administrator privileges to adjust environment
settings. This will become a manual step in the future.

(cherry picked from commit e69de2f)
ztanner added a commit that referenced this pull request Apr 27, 2026
Stacked on #93245

Commit signing is required for anything that lands on `canary`. Our
previous workflow of using a PAT to push a commit no longer works, since
that would have been an unsigned commit.

In #93245 we switched to an app token for release workflow steps. This
continues by:

- Telling Lerna to bump packages but not commit
- Creating a signed commit with the staged changes via GitHub's API
- Then running the publish flow

Test Plan:
Dry run
[here](https://github.com/vercel/next.js/actions/runs/25001287978/job/73211826479)
Commit
[here](3a8456a)

(cherry picked from commit 012fd7d)
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators May 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

created-by: Next.js team PRs by the Next.js team. locked

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants