是否有可能仅在推送新版本(带有新标签)时触发 github 操作?我不想在每次推送到 master 时运行它们,但我也想避免创建发布分支。
最佳答案
使用以下语法:
on:
push:
# Pattern matched against refs/tags
tags:
- '*' # Push events to every tag not containing /
对于分层标签:on:
push:
# Pattern matched against refs/tags
tags:
- '**' # Push events to every tag including hierarchical tags like v1.0/beta
https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestbranchestags
关于github - 仅在新标签上触发 Github Action?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61891328/