Skip to content

Commit

Permalink
Add goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
enginyoyen committed Mar 30, 2021
1 parent 4c2fdde commit 474b94c
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 37 deletions.
25 changes: 0 additions & 25 deletions .github/workflows/go.yml

This file was deleted.

29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release

on:
push:
tags:
- '*'

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
-
name: Release
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
# Dependency directories (remove the comment below to include it)
# vendor/
bin/mimic
dist/
51 changes: 51 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
before:
hooks:
- go mod tidy
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
ldflags:
- -s -w -X github.com/enginyoyen/mimic/pkg/cmd.Version={{.Version}} -X github.com/enginyoyen/mimic/pkg/cmd.GitCommit={{.Commit}} -X github.com/enginyoyen/mimic/pkg/cmd.BuildTime={{.Date}}
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'

brews:
-
name: mimic
tap:
owner: enginyoyen
name: homebrew-tap

url_template: "https://github.com/enginyoyen/mimic/releases/{{ .Tag }}/{{ .ArtifactName }}"
folder: Formula
homepage: "https://github.com/enginyoyen/mimic"
description: "Mimic is standalone HTTP-based mock server."
license: "MIT"
skip_upload: true

test: |
system "#{bin}/program --version"
...
install: |
bin.install "program"
...
12 changes: 0 additions & 12 deletions Makefile

This file was deleted.

0 comments on commit 474b94c

Please sign in to comment.