Skip to content

Commit

Permalink
Add go releaser
Browse files Browse the repository at this point in the history
  • Loading branch information
cooper-oh committed Dec 16, 2024
1 parent 4913ad1 commit 142a588
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Release
on:
push:
tags:
- 'v*'
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- uses: goreleaser/goreleaser-action@v6
with:
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20 changes: 20 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
before:
hooks:
- go mod tidy
builds:
- env:
- CGO_ENABLED=0
goos:
- darwin
- freebsd
- linux
- windows
archives:
- name_template: "{{ .Os }}-{{ .Arch }}"
format: binary
snapshot:
name_template: "{{ .Tag }}-{{ .Commit }}"
changelog:
use: github-native
release:
draft: true

0 comments on commit 142a588

Please sign in to comment.