Skip to content

Commit

Permalink
chore: add binary release
Browse files Browse the repository at this point in the history
  • Loading branch information
06kellyjac committed May 18, 2022
1 parent c1f1388 commit b52f89f
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Release
on:
# https://github.com/actions/runner/issues/1007
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"

jobs:
release:
name: Release on GitHub
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v3
id: go
with:
go-version: ^1.18

- name: Check out code
uses: actions/checkout@v3

- name: Launch goreleaser
uses: goreleaser/[email protected]
with:
args: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27 changes: 27 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
before:
hooks:
- go mod tidy

builds:
- main: "."
binary: badrobot
goos:
- darwin
- linux
goarch:
- amd64
- arm64
ignore:
- goos: darwin
goarch: arm
env:
- CGO_ENABLED=0

checksum:
name_template: "{{ .ProjectName }}_checksums.txt"

archives:
- name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"

snapshot:
name_template: "{{ .Tag }}-next"

0 comments on commit b52f89f

Please sign in to comment.