🌐 AI搜索 & 代理 主页
Skip to content

Commit ff1f0ea

Browse files
authored
Release: Run npm publish in the post-release phase
PR gh-5681 specified the `tmp/release/dist` folder as `publishPath` so that `npm publish` is done from the dist repo, not the source one. However, `npm publish` is invoked by release-it before the post-release phase, at which stage the dist repo is not updated with the new release yet. Instead, do the `npm publish` manually in the post-release stage, just after the dist repo is updated & changes are pushed. Closes gh-5690
1 parent fb5ab0f commit ff1f0ea

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.release-it.cjs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ module.exports = {
3434
tokenRef: "JQUERY_GITHUB_TOKEN"
3535
},
3636
npm: {
37-
publish: true,
38-
publishPath: "tmp/release/dist"
37+
38+
// We're publishing from a dist folder generated in the post-release
39+
// step, so we also need to publish by ourselves; release-it would
40+
// do it too early.
41+
publish: false
3942
}
4043
};

build/release/post-release.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ git commit -m "Release: $1"
3838
git tag -s $1 -m "Release: $1"
3939

4040
# Wait for confirmation from user to push changes to dist repo
41-
read -p "Press enter to push changes to dist repo"
41+
read -p "Press enter to push changes to dist repo & publish to npm"
4242
git push --follow-tags
43+
npm publish
4344
cd -
4445

4546
# Restore AUTHORS URL

0 commit comments

Comments
 (0)