Skip to content

Open Source (#1)

Open Source (#1) #2

Workflow file for this run

name: goreleaser
on:
push:
# run only against tags
tags:
- "v0.[0-9]+.[0-9]+"
- "v1.[0-9]+.[0-9]+"
env:
GO_VERSION: 1.22
GO_RELEASER_VERSION: v1.25.1
permissions:
contents: write
packages: write
id-token: write
jobs:
goreleaser:
runs-on: ubuntu-latest
environment: homebrew-tap
steps:
- uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Setup Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5
with:
go-version: ${{ env.GO_VERSION }}
- uses: sigstore/cosign-installer@e1523de7571e31dbe865fd2e80c5c7c23ae71eb4 # v3.4.0
- uses: actions/create-github-app-token@f2acddfb5195534d487896a656232b016a682f3c # v1.9.0
id: homebrew-tapper-bot-token
with:
app-id: ${{ vars.HOMEBREW_TAPPER_BOT_APP_ID }}
private-key: ${{ secrets.HOMEBREW_TAPPER_BOT_PRIVATE_KEY }}
repositories: homebrew-tap
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5
with:
distribution: goreleaser
version: ${{ env.GO_RELEASER_VERSION }} # Not pinnable by hash, nor does it verify its signature
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAP_GITHUB_TOKEN: ${{ steps.homebrew-tapper-bot-token.outputs.token }}