Skip to content

Commit

Permalink
Add goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
RobolabGs2 committed Oct 3, 2021
1 parent 6ad04f3 commit 0e2aa2d
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
before:
hooks:
- go mod download

builds:
-
binary: tester
env:
- CGO_ENABLED=0
ldflags:
- -w -s -extldflags "-static"
goos:
- windows
# TODO: switch on after solve `exec.Command("cmd"...)` problem
# - darwin
# - linux
# - freebsd

archives:
-
replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
format_overrides:
- goos: windows
format: zip

checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
- '^chore'
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
on:
push:
tags:
- '*'
name: goreleaser
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Unshallow
run: git fetch --prune --unshallow
- name: Setup Go Faster
uses: WillAbides/[email protected]
with:
go-version: 1.16.x
- name: Release
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --config=.github/goreleaser.yml --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 0e2aa2d

Please sign in to comment.