Skip to content

Commit e379743

Browse files
committed
chore(release): stop overwriting npm latest dist-tag
Assigns the v4 branch its own dist-tag (`v4`) and restricts it to the 4.x version range. This prevents v4 maintenance releases from overwriting the latest major version in the default npm channel.
1 parent e451c62 commit e379743

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ jobs:
2828
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2929
GIT_AUTHOR_NAME: "ioredis robot"
3030
GIT_AUTHOR_EMAIL: "[email protected]"
31-
run: npx semantic-release --branches v4
31+
run: npx semantic-release

.releaserc.json

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
{
2-
"branches": ["v4"],
2+
"branches": [
3+
{
4+
"name": "v4",
5+
"tag": "v4",
6+
"channel": "v4"
7+
}
8+
],
39
"verifyConditions": [
410
"@semantic-release/npm",
511
"@semantic-release/changelog",
@@ -23,10 +29,7 @@
2329
]
2430
}
2531
],
26-
"publish": [
27-
"@semantic-release/npm",
28-
"@semantic-release/github"
29-
],
32+
"publish": ["@semantic-release/npm", "@semantic-release/github"],
3033
"analyzeCommits": {
3134
"preset": "angular",
3235
"releaseRules": [

0 commit comments

Comments
 (0)