如何仅在包装中的版本时才能运行github工作流程。
我只想在包装版本的版本被凸起时才能运行GitHub工作流程。
运行NPM版本修补程序
并推到GitHub后,我想发布此新版本。这就是我尝试的方法,但它仍然随着每个合并而建立。
name: Publish test module
on:
push:
branches:
- main
paths:
- packages/testmodule/package.json
- '*.json'
- .github/workflows/test.yml
I want to run Github workflow only when the version of the package has been bumped up.
after running npm version patch
and push to GitHub I want to publish this new version. This's what I've tried but it still builds with every merge.
name: Publish test module
on:
push:
branches:
- main
paths:
- packages/testmodule/package.json
- '*.json'
- .github/workflows/test.yml
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能需要使用 github-action-npm-rease 。
这是一个最小的示例:
此操作仅涉及检查
package.json
版本是否已更新。如果做发布,请使用 version-greation-check 而不是。You may want to use the github-action-npm-release.
Here is a minimal example:
This action only concerns itself with checking if the
package.json
version has been updated or not. In case of doing a release, please use the version-check instead.