Skip to content

Commit

Permalink
Add goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
nakabonne committed Sep 16, 2020
1 parent 2fb876c commit a1b616d
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Unshallow
run: git fetch --prune --unshallow
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.15
- name: Login docker.io
run: docker login -u nakabonne -p ${{ secrets.DOCKER_PASSWORD }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN_WITH_REPO_PERM }}
48 changes: 48 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
before:
hooks:
- go mod tidy
builds:
- main: .
binary: ali
goos:
- freebsd
- darwin
- linux
- windows
goarch:
- amd64
- arm
- arm64
- 386
- ppc64le
- s390x
- mips64
- mips64le
goarm:
- 6
- 7
env:
- CGO_ENABLED=0
ldflags: -s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.Date}}

archives:
- replacements:
386: 32-bit

checksum:
name_template: 'checksums.txt'

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

changelog:
filters:
exclude:
- '^test:'

brews:
- github:
owner: nakabonne
name: homebrew-ali
homepage: 'https://github.com/nakabonne/ali'
description: 'Generate HTTP load and plot the results in real-time'

0 comments on commit a1b616d

Please sign in to comment.