Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
c418b7aa
Unverified
Commit
c418b7aa
authored
Sep 23, 2026
by
Sebastian "Sebbie" Silbermann
Committed by
GitHub
Sep 23, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[cd] Skip the release job when no new commits warrant a release (#98664)
parent
3874b55d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
14 deletions
+27
-14
trigger_release.yml
.github/workflows/trigger_release.yml
+27
-14
No files found.
.github/workflows/trigger_release.yml
View file @
c418b7aa
...
@@ -36,6 +36,8 @@ env:
...
@@ -36,6 +36,8 @@ env:
TURBO_VERSION
:
2.9.4
TURBO_VERSION
:
2.9.4
NODE_LTS_VERSION
:
20
NODE_LTS_VERSION
:
20
permissions
:
{}
jobs
:
jobs
:
start
:
start
:
if
:
github.repository_owner == 'vercel'
if
:
github.repository_owner == 'vercel'
...
@@ -85,36 +87,45 @@ jobs:
...
@@ -85,36 +87,45 @@ jobs:
env
:
env
:
GH_TOKEN
:
${{ steps.release-app-token.outputs.token }}
GH_TOKEN
:
${{ steps.release-app-token.outputs.token }}
-
name
:
Get commit of the latest tag
run
:
|
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
-
name
:
Check if new commits since last tag
-
name
:
Check if new commits since last tag
if
:
${{ github.event.inputs.releaseType != 'stable' && inputs.force !=
true
}}
id
:
new-commits
env
:
INPUT_RELEASETYPE
:
${{ github.event.inputs.releaseType || '' }}
INPUT_FORCE
:
${{ github.event.inputs.force ||
false
}}
run
:
|
run
:
|
if [ "$LATEST_TAG_COMMIT" = "$LATEST_COMMIT" ]; then
set -euo pipefail
echo "No new commits. Exiting..."
# Stable releases and forced runs release regardless of new commits.
exit 1
if [ "$INPUT_RELEASETYPE" = "stable" ] || [ "$INPUT_FORCE" = "true" ]; then
has_new_commits=true
else
latest_tag="$(git describe --tags --abbrev=0)"
if [ "$(git rev-list -n 1 "$latest_tag")" = "$(git rev-parse HEAD)" ]; then
echo "No new commits since $latest_tag. Skipping release."
has_new_commits=false
else
has_new_commits=true
fi
fi
fi
echo "has_new_commits=$has_new_commits" >> "$GITHUB_OUTPUT"
# https://github.com/actions/virtual-environments/issues/1187
# https://github.com/actions/virtual-environments/issues/1187
-
name
:
tune linux network
-
name
:
tune linux network
if
:
steps.new-commits.outputs.has_new_commits == 'true'
run
:
sudo ethtool -K eth0 tx off rx off
run
:
sudo ethtool -K eth0 tx off rx off
-
name
:
Setup corepack
-
name
:
Setup corepack
if
:
steps.new-commits.outputs.has_new_commits == 'true'
run
:
|
run
:
|
npm i -g corepack@0.31
npm i -g corepack@0.31
corepack enable
corepack enable
pnpm --version
pnpm --version
-
id
:
get-store-path
-
id
:
get-store-path
if
:
steps.new-commits.outputs.has_new_commits == 'true'
run
:
echo STORE_PATH=$(pnpm store path) >> $GITHUB_OUTPUT
run
:
echo STORE_PATH=$(pnpm store path) >> $GITHUB_OUTPUT
-
uses
:
actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae
# v5.0.5
-
uses
:
actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae
# v5.0.5
if
:
steps.new-commits.outputs.has_new_commits == 'true'
timeout-minutes
:
5
timeout-minutes
:
5
id
:
cache-pnpm-store
id
:
cache-pnpm-store
with
:
with
:
...
@@ -122,9 +133,11 @@ jobs:
...
@@ -122,9 +133,11 @@ jobs:
key
:
pnpm-store-root-v1-${{ hashFiles('pnpm-lock.yaml') }}
key
:
pnpm-store-root-v1-${{ hashFiles('pnpm-lock.yaml') }}
# Do not use restore-keys since it leads to indefinite growth of the cache.
# Do not use restore-keys since it leads to indefinite growth of the cache.
-
run
:
pnpm install
-
if
:
steps.new-commits.outputs.has_new_commits == 'true'
run
:
pnpm install
-
run
:
node ./scripts/start-release.js --release-type "${INPUT_RELEASETYPE}" --semver-type "${INPUT_SEMVERTYPE}"
-
if
:
steps.new-commits.outputs.has_new_commits == 'true'
run
:
node ./scripts/start-release.js --release-type "${INPUT_RELEASETYPE}" --semver-type "${INPUT_SEMVERTYPE}"
env
:
env
:
RELEASE_GITHUB_TOKEN
:
${{ steps.release-app-token.outputs.token }}
RELEASE_GITHUB_TOKEN
:
${{ steps.release-app-token.outputs.token }}
RELEASE_GITHUB_APP_SLUG
:
${{ steps.release-app-token.outputs.app-slug }}
RELEASE_GITHUB_APP_SLUG
:
${{ steps.release-app-token.outputs.app-slug }}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment