[英]How to set up GoReleaser to push a brew tap to a different repo
我希望在私人 github 存储库上设置一个 github 操作脚本,该脚本将发布和 brew tap 推送到单独的公共 git 存储库。 我创建了一个.gorelease.yml
文件和指定brews
这样的部分:
brews:
- name: myrepo
goarm: 6
github:
owner: myrepo
name: homebrew-myrepo
homepage: "https://myrepo.com"
.gorelease.yml
文件工作正常并成功构建二进制文件。 我还在 github 操作中为公共存储库指定了一个 github 令牌,这样应该就可以了。
当我运行 github 操作时,出现此错误:
fatal: no tag exactly matches '38d505213e445a673a34812929ff858595e1a887'
⚠️ No tag found for commit 38d5052. Snapshot forced
...
• signing artifacts
• pipe skipped error=artifact signing is disabled
• docker images
• pipe skipped error=docker section is not configured
• publishing
• pipe skipped error=publishing is disabled
• release succeeded after 159.12s
我不明白为什么当前的 git repo 是相关的。 因为我要推送到一个单独的 repo,所以这个脚本不应该检查那个 repo 上的标签(不是当前的)? 即使在这种情况下,我如何在每次推送时自动创建标签?
goreleaser
使用 semver 来计算版本,所以你必须以v1.2.4
的格式添加标签
git tag v1.2.4
git push --tags
.goreleaser.yml
brews:
- github:
owner: my-repo
name: homebrew-myrepo
folder: Formula
homepage: https://github.com/my-repo/abc
工作流文件
- name: GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GR_TOKEN }}
注意:不要忘记创建一个新令牌并将其作为机密添加到相关存储库中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.