[英]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.