Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -548,10 +548,20 @@ jobs:
merge-multiple: true
path: crates/wasm

- name: Create GitHub App token
id: release-app-token
uses: actions/create-github-app-token@v3
with:
client-id: ${{ vars.RELEASE_GITHUB_APP_CLIENT_ID }}
private-key: ${{ secrets.RELEASE_GITHUB_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: next.js
permission-contents: write

- run: ./scripts/publish-native.js
- run: ./scripts/publish-release.js
env:
RELEASE_BOT_GITHUB_TOKEN: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}
RELEASE_GITHUB_TOKEN: ${{ steps.release-app-token.outputs.token }}

buildPassed:
needs: ['deploy-target', 'build', 'build-wasm', 'build-native']
Expand Down
30 changes: 24 additions & 6 deletions .github/workflows/create_release_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ on:
type: string
required: true

secrets:
RELEASE_BOT_GITHUB_TOKEN:
required: true

name: Create Release Branch

env:
Expand All @@ -39,13 +35,33 @@ jobs:
node-version: 20
check-latest: true

- name: Create GitHub App token
id: release-app-token
uses: actions/create-github-app-token@v3
with:
client-id: ${{ vars.RELEASE_GITHUB_APP_CLIENT_ID }}
private-key: ${{ secrets.RELEASE_GITHUB_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: next.js
permission-contents: write
permission-environments: write
permission-workflows: write

- name: Get GitHub App user ID
id: release-app-user
run: |
user_id="$(gh api "/users/${{ steps.release-app-token.outputs.app-slug }}[bot]" --jq .id)"
echo "user-id=$user_id" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ steps.release-app-token.outputs.token }}

- name: Clone Next.js repository
run: git clone https://github.com/vercel/next.js.git --depth=25 --single-branch --branch ${GITHUB_REF_NAME:-canary} .

- name: Check token
run: gh auth status
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}
GH_TOKEN: ${{ steps.release-app-token.outputs.token }}

# https://github.com/actions/virtual-environments/issues/1187
- name: tune linux network
Expand All @@ -72,6 +88,8 @@ jobs:

- run: node ./scripts/create-release-branch.js --branch-name "${INPUT_BRANCHNAME}" --tag-name "${INPUT_TAGNAME}"
env:
RELEASE_BOT_GITHUB_TOKEN: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}
RELEASE_GITHUB_TOKEN: ${{ steps.release-app-token.outputs.token }}
RELEASE_GITHUB_APP_SLUG: ${{ steps.release-app-token.outputs.app-slug }}
RELEASE_GITHUB_APP_USER_ID: ${{ steps.release-app-user.outputs.user-id }}
INPUT_BRANCHNAME: ${{ github.event.inputs.branchName }}
INPUT_TAGNAME: ${{ github.event.inputs.tagName }}
26 changes: 24 additions & 2 deletions .github/workflows/sync_backport_canary_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,23 @@ jobs:
if: steps.precheck.outputs.should_evaluate == 'true'
run: pnpm install --frozen-lockfile --ignore-scripts

- name: Create GitHub App token
id: release-app-token
if: steps.precheck.outputs.should_evaluate == 'true'
uses: actions/create-github-app-token@v3
with:
client-id: ${{ vars.RELEASE_GITHUB_APP_CLIENT_ID }}
private-key: ${{ secrets.RELEASE_GITHUB_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: next.js
permission-actions: read
permission-contents: read

- name: Evaluate backport release
id: evaluate
if: steps.precheck.outputs.should_evaluate == 'true'
env:
RELEASE_BOT_GITHUB_TOKEN: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}
RELEASE_GITHUB_TOKEN: ${{ steps.release-app-token.outputs.token }}
WORKFLOW_RUN_ID: ${{ github.event_name == 'workflow_dispatch' && inputs.workflowRunId || github.event.workflow_run.id }}
HEAD_SHA: ${{ github.event_name == 'workflow_dispatch' && inputs.headSha || github.event.workflow_run.head_sha }}
HEAD_COMMIT_MESSAGE: ${{ github.event_name == 'workflow_dispatch' && '' || github.event.workflow_run.head_commit.message }}
Expand All @@ -108,9 +120,19 @@ jobs:
if: ${{ needs.evaluate.outputs.should_dispatch == 'true' && ((github.event_name == 'workflow_dispatch' && inputs.dispatch) || (github.event_name == 'workflow_run' && vars.ENABLE_BACKPORT_CANARY_SYNC == 'true')) }}
runs-on: ubuntu-latest
steps:
- name: Create GitHub App token
id: release-app-token
uses: actions/create-github-app-token@v3
with:
client-id: ${{ vars.RELEASE_GITHUB_APP_CLIENT_ID }}
private-key: ${{ secrets.RELEASE_GITHUB_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: next.js
permission-actions: write

- uses: actions/github-script@v7
with:
github-token: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}
github-token: ${{ steps.release-app-token.outputs.token }}
script: |
await github.request(
"POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches",
Expand Down
29 changes: 26 additions & 3 deletions .github/workflows/trigger_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,24 @@ jobs:
node-version: 20
check-latest: true

- name: Create GitHub App token
id: release-app-token
uses: actions/create-github-app-token@v3
with:
client-id: ${{ vars.RELEASE_GITHUB_APP_CLIENT_ID }}
private-key: ${{ secrets.RELEASE_GITHUB_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: next.js
permission-contents: write

- name: Get GitHub App user ID
id: release-app-user
run: |
user_id="$(gh api "/users/${{ steps.release-app-token.outputs.app-slug }}[bot]" --jq .id)"
echo "user-id=$user_id" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ steps.release-app-token.outputs.token }}

- name: Clone Next.js repository
run: git clone https://github.com/vercel/next.js.git --depth=25 --single-branch --branch ${GITHUB_REF_NAME:-canary} .

Expand All @@ -61,10 +79,13 @@ jobs:
# Ignoring failures for now to check if a failure truly implies a failed publish.
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}
GH_TOKEN: ${{ steps.release-app-token.outputs.token }}

- 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
latest_tag="$(git describe --tags --abbrev=0)"
echo "LATEST_TAG_COMMIT=$(git rev-list -n 1 "$latest_tag")" >> $GITHUB_ENV

- name: Get latest commit
run: echo "LATEST_COMMIT=$(git rev-parse HEAD)" >> $GITHUB_ENV
Expand Down Expand Up @@ -102,6 +123,8 @@ jobs:

- run: node ./scripts/start-release.js --release-type "${INPUT_RELEASETYPE}" --semver-type "${INPUT_SEMVERTYPE}"
env:
RELEASE_BOT_GITHUB_TOKEN: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}
RELEASE_GITHUB_TOKEN: ${{ steps.release-app-token.outputs.token }}
RELEASE_GITHUB_APP_SLUG: ${{ steps.release-app-token.outputs.app-slug }}
RELEASE_GITHUB_APP_USER_ID: ${{ steps.release-app-user.outputs.user-id }}
INPUT_RELEASETYPE: ${{ github.event.inputs.releaseType || 'canary' }}
INPUT_SEMVERTYPE: ${{ github.event.inputs.semverType }}
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
"registry": "https://registry.npmjs.org/"
}
},
"version": "16.3.0-canary.2"
"version": "16.3.0-canary.3"
}
4 changes: 2 additions & 2 deletions packages/create-next-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-next-app",
"version": "16.3.0-canary.2",
"version": "16.3.0-canary.3",
"keywords": [
"react",
"next",
Expand Down Expand Up @@ -50,4 +50,4 @@
"engines": {
"node": ">=20.9.0"
}
}
}
6 changes: 3 additions & 3 deletions packages/eslint-config-next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-next",
"version": "16.3.0-canary.2",
"version": "16.3.0-canary.3",
"description": "ESLint configuration used by Next.js.",
"license": "MIT",
"repository": {
Expand All @@ -12,7 +12,7 @@
"dist"
],
"dependencies": {
"@next/eslint-plugin-next": "16.3.0-canary.2",
"@next/eslint-plugin-next": "16.3.0-canary.3",
"eslint-import-resolver-node": "^0.3.6",
"eslint-import-resolver-typescript": "^3.5.2",
"eslint-plugin-import": "^2.32.0",
Expand Down Expand Up @@ -60,4 +60,4 @@
"default": "./dist/parser.js"
}
}
}
}
4 changes: 2 additions & 2 deletions packages/eslint-plugin-internal/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@next/eslint-plugin-internal",
"private": true,
"version": "16.3.0-canary.2",
"version": "16.3.0-canary.3",
"description": "ESLint plugin for working on Next.js.",
"exports": {
".": "./src/eslint-plugin-internal.js"
Expand All @@ -18,4 +18,4 @@
"eslint": "9.37.0"
},
"scripts": {}
}
}
4 changes: 2 additions & 2 deletions packages/eslint-plugin-next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/eslint-plugin-next",
"version": "16.3.0-canary.2",
"version": "16.3.0-canary.3",
"description": "ESLint plugin for Next.js.",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand All @@ -25,4 +25,4 @@
"types": "tsc --project tsconfig.json --skipLibCheck --declaration --emitDeclarationOnly --esModuleInterop --declarationDir dist",
"prepublishOnly": "cd ../../ && turbo run build"
}
}
}
4 changes: 2 additions & 2 deletions packages/font/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@next/font",
"private": true,
"version": "16.3.0-canary.2",
"version": "16.3.0-canary.3",
"repository": {
"url": "vercel/next.js",
"directory": "packages/font"
Expand All @@ -27,4 +27,4 @@
"fontkit": "2.0.2",
"typescript": "6.0.2"
}
}
}
4 changes: 2 additions & 2 deletions packages/next-bundle-analyzer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/bundle-analyzer",
"version": "16.3.0-canary.2",
"version": "16.3.0-canary.3",
"main": "index.js",
"types": "index.d.ts",
"license": "MIT",
Expand All @@ -14,4 +14,4 @@
"scripts": {
"pack-for-isolated-tests": "pnpm pack --out ./packed.tgz"
}
}
}
4 changes: 2 additions & 2 deletions packages/next-codemod/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/codemod",
"version": "16.3.0-canary.2",
"version": "16.3.0-canary.3",
"license": "MIT",
"repository": {
"type": "git",
Expand Down Expand Up @@ -42,4 +42,4 @@
"@types/semver": "7.3.1",
"typescript": "6.0.2"
}
}
}
4 changes: 2 additions & 2 deletions packages/next-env/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/env",
"version": "16.3.0-canary.2",
"version": "16.3.0-canary.3",
"keywords": [
"react",
"next",
Expand Down Expand Up @@ -34,4 +34,4 @@
"dotenv": "16.3.1",
"dotenv-expand": "10.0.0"
}
}
}
4 changes: 2 additions & 2 deletions packages/next-mdx/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/mdx",
"version": "16.3.0-canary.2",
"version": "16.3.0-canary.3",
"main": "index.js",
"license": "MIT",
"repository": {
Expand All @@ -25,4 +25,4 @@
"scripts": {
"pack-for-isolated-tests": "pnpm pack --out ./packed.tgz"
}
}
}
4 changes: 2 additions & 2 deletions packages/next-playwright/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/playwright",
"version": "16.3.0-canary.2",
"version": "16.3.0-canary.3",
"repository": {
"url": "vercel/next.js",
"directory": "packages/next-playwright"
Expand Down Expand Up @@ -29,4 +29,4 @@
"@playwright/test": "1.58.2",
"typescript": "6.0.2"
}
}
}
4 changes: 2 additions & 2 deletions packages/next-plugin-storybook/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@next/plugin-storybook",
"version": "16.3.0-canary.2",
"version": "16.3.0-canary.3",
"repository": {
"url": "vercel/next.js",
"directory": "packages/next-plugin-storybook"
},
"scripts": {}
}
}
4 changes: 2 additions & 2 deletions packages/next-polyfill-module/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/polyfill-module",
"version": "16.3.0-canary.2",
"version": "16.3.0-canary.3",
"description": "A standard library polyfill for ES Modules supporting browsers (Edge 16+, Firefox 60+, Chrome 61+, Safari 10.1+)",
"main": "dist/polyfill-module.js",
"license": "MIT",
Expand All @@ -16,4 +16,4 @@
"devDependencies": {
"microbundle": "0.15.0"
}
}
}
4 changes: 2 additions & 2 deletions packages/next-polyfill-nomodule/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/polyfill-nomodule",
"version": "16.3.0-canary.2",
"version": "16.3.0-canary.3",
"description": "A polyfill for non-dead, nomodule browsers.",
"main": "dist/polyfill-nomodule.js",
"license": "MIT",
Expand All @@ -19,4 +19,4 @@
"object-assign": "4.1.1",
"whatwg-fetch": "3.0.0"
}
}
}
Loading
Loading