我希望在一个私人的github回购上设置一个github动作脚本,它推动了一个发布,并向一个单独的公共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回购是相关的。因为我正在推动一个单独的回购,这个脚本不应该检查回购上的标记(不是当前的)吗?即使在这种情况下,我如何在每次推送时自动创建一个标记?
发布于 2020-06-29 13:19:56
goreleaser使用义量器来计算版本,所以您必须以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 }}注意:不要忘记创建一个新令牌,并将其作为秘密添加到相关存储库中。
https://stackoverflow.com/questions/60918957
复制相似问题