Fix release workflow for sgard homebrew formula.
Update formula references from cert to sgard, add needs: goreleaser dependency, and pass tag-name to the bump action. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
62
.github/workflows/release.yml
vendored
Normal file
62
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
name: Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
workflow_dispatch: {}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
goreleaser:
|
||||||
|
name: GoReleaser
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version-file: 'go.mod'
|
||||||
|
cache: true
|
||||||
|
|
||||||
|
- name: Run GoReleaser
|
||||||
|
uses: goreleaser/goreleaser-action@v6
|
||||||
|
with:
|
||||||
|
distribution: goreleaser
|
||||||
|
version: latest
|
||||||
|
args: release --clean
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GH_CPAT }}
|
||||||
|
homebrew:
|
||||||
|
name: Bump Homebrew formula
|
||||||
|
needs: goreleaser
|
||||||
|
# Skip this job in case of git pushes to prerelease tags
|
||||||
|
if: ${{ github.event_name != 'push' || !contains(github.ref, '-') }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
steps:
|
||||||
|
- name: Extract version
|
||||||
|
id: extract-version
|
||||||
|
run: |
|
||||||
|
echo "tag-name=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- uses: mislav/bump-homebrew-formula-action@v3
|
||||||
|
with:
|
||||||
|
formula-name: sgard
|
||||||
|
formula-path: Formula/sgard.rb
|
||||||
|
homebrew-tap: kisom/homebrew-tap
|
||||||
|
base-branch: master
|
||||||
|
tag-name: ${{ steps.extract-version.outputs.tag-name }}
|
||||||
|
commit-message: |
|
||||||
|
{{formulaName}} {{version}}
|
||||||
|
|
||||||
|
Created by https://github.com/mislav/bump-homebrew-formula-action
|
||||||
|
env:
|
||||||
|
COMMITTER_TOKEN: ${{ secrets.GH_CPAT }}
|
||||||
Reference in New Issue
Block a user