Skip to content

Commit

Permalink
feature: Goreleaser config & gh action release
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Broudoux <arthur.broudoux@gmail.com>
  • Loading branch information
abroudoux committed Feb 7, 2025
1 parent e931328 commit 09bb9c0
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: release

on:
push:
tags:
- "*"

permissions:
contents: write

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a #v5.2.0
with:
go-version: "1.21.3"

- name: Publish Homebrew package with Goreleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: "${{ env.GITHUB_REF_NAME }}"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.PUBLISHER_TOKEN }}
38 changes: 38 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
version: 2

builds:
- main: ./main.go
binary: microcks-cli
env:
- CGO_ENABLED=0

release:
prerelease: auto

universal_binaries:
- replace: true

signs:
- artifacts: checksum
cmd: gpg2
args:
- "--batch"
- "-u"
- "{{ .Env.GPG_FINGERPRINT }}"
- "--output"
- "${signature}"
- "--detach-sign"
- "${artifact}"

brews:
- name: microcks-cli
homepage: https://github.com/microcks/microcks-cli
repository:
owner: microcks
name: homebrew-tap

sboms:
- artifacts: archive

checksum:
name_template: "checksums.txt"

0 comments on commit 09bb9c0

Please # to comment.