Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
本次 PR 主要有三个改动:
之前的流程有个问题:会对 PR 提交进行快照发布,但 PR 是开发者对现有仓库的改进或功能增强,并不能确保 PR 的质量。所以 PR 只是运行测试,以对 PR 内容质量的保证。
将 workflow 流程分为测试和发布快照,这样做的好处是当测试不通过时不会进行快照发布。并且在观感上来看,一眼就可以看出是测试出问题还是发布了问题。
这是基于性能的考虑,在之前使用 maven 插件中,使用了两个 maven 插件:
JustAuth/.github/workflows/deploy-snapshot.yml
Lines 35 to 39 in 21e23aa
这些 maven 插件可以很好的替换 pom.xml 中的 version 属性。但是只是替换 version 这个功能,需要从中央仓库拉取代码,并执行整个插件流程,整体下来未免有点重。
在我浏览文档的过程中,发现在 GitHub Actions 中可以使用 python 脚本,于是重写了改地方:
显著的成效是:将运行时间从之前使用 mavan 插件的 4s~17s 降低到了使用 python 脚本 0s。