deploy-release-test
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDeploy Release Test
部署发布测试
Use this skill only when manually running the entire Next.js deployment test
suite for a pull request. Treat package validation as a hard gate: never
dispatch the workflow until the exact commit's redirected tarball responds
successfully.
仅在为拉取请求(PR)手动运行完整的Next.js部署测试套件时使用此技能。将包验证视为硬性门槛:在确切提交的重定向tarball响应成功之前,切勿触发工作流。
Scope
适用范围
Do not use this workflow to sanity-check one deployment test or a focused group
of tests. Follow
Running Deploy Tests Locally
instead:
bash
NEXT_TEST_VERSION=https://vercel-packages.vercel.app/next/commits/<commit-sha>/next pnpm test-deploy <path-to-test>If a request to "run deploy tests" does not explicitly call for the entire
suite, prefer the focused local workflow and scope it to the affected tests.
请勿使用此工作流对单个部署测试或一组针对性测试进行sanity检查。请改用本地运行部署测试:
bash
NEXT_TEST_VERSION=https://vercel-packages.vercel.app/next/commits/<commit-sha>/next pnpm test-deploy <path-to-test>如果“运行部署测试”的请求未明确要求运行整个套件,请优先选择本地针对性工作流,并将范围限定在受影响的测试上。
Inputs
输入要求
- Accept a PR number or determine the PR from the current branch.
- Use repository and workflow
vercel/next.js..github/workflows/test_e2e_deploy_release.yml - Require the PR head branch to exist in . A fork branch cannot run this secret-bearing workflow; use the repository's PR adoption process first when appropriate.
vercel/next.js
- 接受PR编号,或从当前分支确定PR。
- 使用仓库和工作流
vercel/next.js。.github/workflows/test_e2e_deploy_release.yml - 要求PR头部分支存在于中。fork分支无法运行此包含敏感信息的工作流;必要时请先使用仓库的PR采纳流程。
vercel/next.js
Workflow
工作流程
-
Resolve the PR branch and its latest commit from GitHub, not merely from the local checkout:bash
gh pr view <pr-number> --repo vercel/next.js \ --json number,url,headRefName,headRefOid,isCrossRepositoryIf no PR number was supplied, omitto detect the PR from the current branch. Stop if<pr-number>isisCrossRepository. Recordtrueas the branch andheadRefNameas the commit SHA.headRefOid -
Construct the exact package URL:text
https://vercel-packages.vercel.app/next/commits/<commit-sha>/next -
Wait for the package to become downloadable before dispatching anything:bash
node scripts/wait-for-preview-tarball.mjs --commit-sha <commit-sha>Keep the wait in an ongoing terminal session and poll it so the user still receives progress updates. The helper uses, follows the redirect to Vercel Blob, and only succeeds when the final artifact is available. Do not substitute a check that accepts the initial redirect: that endpoint can redirect even while the blob still returns 404.HEADIf the helper times out or reports an authorization or build failure, do not dispatch the workflow. Report the failure and inspect the commit's/build-and-deploychecks if useful.upload-preview-tarballs -
Resolve the PR again immediately after validation. Compare the currentand
headRefNamewith the recorded values. If either changed, return to step 2 and validate the new commit-specific URL. Never reuse the old package URL for a moved branch.headRefOid -
Trigger the workflow from the PR branch and pass only:
nextVersionbashgh workflow run test_e2e_deploy_release.yml \ --repo vercel/next.js \ --ref <pr-branch> \ -f nextVersion=https://vercel-packages.vercel.app/next/commits/<commit-sha>/nextDo not pass any othervalues. Leaving them unspecified preserves the workflow defaults, including-fand empty optional overrides.vercelCliVersion: vercel@latest -
Find and verify the newly created run:bash
gh run list --repo vercel/next.js \ --workflow test_e2e_deploy_release.yml \ --branch <pr-branch> \ --event workflow_dispatch \ --limit 5 \ --json databaseId,url,status,conclusion,headBranch,headSha,displayTitle,createdAtConfirm that the newest matching run has:- equal to the PR branch
headBranch - equal to the validated commit SHA
headSha - containing the exact commit-specific package URL
displayTitle
A race can still move the branch between the final check and dispatch. If the run'sdiffers, report the mismatch and do not trigger another run until the new SHA's package has been validated.headSha
-
从GitHub而非本地检出内容解析PR分支及其最新提交:bash
gh pr view <pr-number> --repo vercel/next.js \ --json number,url,headRefName,headRefOid,isCrossRepository如果未提供PR编号,请省略以从当前分支检测PR。如果<pr-number>为isCrossRepository,则停止操作。记录true为分支名称,headRefName为提交SHA。headRefOid -
构造确切的包URL:text
https://vercel-packages.vercel.app/next/commits/<commit-sha>/next -
在触发任何操作之前,等待包可下载:bash
node scripts/wait-for-preview-tarball.mjs --commit-sha <commit-sha>在持续的终端会话中等待并轮询,以便用户仍能收到进度更新。该辅助工具使用请求,跟随重定向到Vercel Blob,仅当最终工件可用时才会成功。请勿替代为接受初始重定向的检查:该端点可能在blob仍返回404时就进行重定向。HEAD如果辅助工具超时或报告授权或构建失败,请不要触发工作流。报告失败情况,如有需要可检查提交的/build-and-deploy检查状态。upload-preview-tarballs -
验证完成后立即重新解析PR。将当前的和
headRefName与记录的值进行比较。如果其中任何一个发生变化,请返回步骤2并验证新提交对应的URL。切勿为已更新的分支重用旧的包URL。headRefOid -
从PR分支触发工作流,仅传递参数:
nextVersionbashgh workflow run test_e2e_deploy_release.yml \ --repo vercel/next.js \ --ref <pr-branch> \ -f nextVersion=https://vercel-packages.vercel.app/next/commits/<commit-sha>/next请勿传递任何其他参数。留空这些参数将保留工作流默认值,包括-f以及空的可选覆盖参数。vercelCliVersion: vercel@latest -
查找并验证新创建的运行:bash
gh run list --repo vercel/next.js \ --workflow test_e2e_deploy_release.yml \ --branch <pr-branch> \ --event workflow_dispatch \ --limit 5 \ --json databaseId,url,status,conclusion,headBranch,headSha,displayTitle,createdAt确认最新的匹配运行满足以下条件:- 等于PR分支
headBranch - 等于已验证的提交SHA
headSha - 包含确切的特定提交包URL
displayTitle
在最终检查和触发之间,分支仍可能被更新。如果运行的不一致,请报告不匹配情况,直到新SHA对应的包已验证完成后再触发新的运行。headSha
Completion Report
完成报告
Report the PR branch, validated SHA and package URL, workflow run URL, and its
current status. Do not wait for the full deployment suite unless the user asks
you to monitor it.
报告PR分支、已验证的SHA和包URL、工作流运行URL及其当前状态。除非用户要求监控,否则无需等待完整部署套件运行完成。
Related Skills
相关技能
- - Inspect failures if the deployment workflow does not pass.
$pr-status-triage - - Create or update the internal PR branch before deployment testing.
$create-pr
- - 如果部署工作流未通过,检查失败原因。
$pr-status-triage - - 在部署测试之前创建或更新内部PR分支。
$create-pr