Skip to content

Commit

Permalink
[github actions] goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
s0md3v authored Apr 7, 2022
2 parents dab48f2 + 5c8a994 commit eff9249
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
on:
push:
tags:
- "*"

jobs:
build:
name: GoReleaser build
runs-on: ubuntu-latest

steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set Up Go
uses: actions/setup-go@v2
with:
go-version: '1.x'
id: go

- name: run GoReleaser
uses: goreleaser/goreleaser-action@master
with:
version: latest
args: release --rm-dist -p 2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48 changes: 48 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
project_name: smap
builds:
- main: .
binary: smap
dir: ./cmd/smap
env:
- CGO_ENABLED=0
goos:
- darwin
- linux
- windows
- freebsd
goarch:
- amd64
- arm
- arm64
- mips
goarm:
- 7
ignore:
- goos: freebsd
goarch: arm
- goos: freebsd
goarch: arm64
- goos: freebsd
goarch: mips
- goos: windows
goarch: arm
goarm: 7
- goos: windows
goarch: arm64
- goos: linux
goarch: mips

archives:
- name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ .Arm }}"
format: tar.xz
format_overrides:
- goos: windows
format: zip
replacements:
darwin: macOS
wrap_in_directory: true
checksum:
name_template: "{{ .ProjectName }}_{{ .Version }}--sha256_checksums.txt"
release:
draft: true

0 comments on commit eff9249

Please sign in to comment.