Skip to content

Commit

Permalink
v3: Setup GoReleaser to release CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
andreynering committed Dec 27, 2019
1 parent 3abdf13 commit 3470baa
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,23 @@
name: goreleaser

on: [pull_request, push]

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1

- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.13.x

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -26,3 +26,4 @@ _testmain.go
*.sqlite3
.env
/testfixtures
/dist
41 changes: 41 additions & 0 deletions .goreleaser.yml
@@ -0,0 +1,41 @@
build:
binary: testfixtures
main: ./cmd/testfixtures
goos:
- windows
- darwin
- linux
goarch:
- 386
- amd64
ignore:
- goos: darwin
goarch: 386
flags:
- -tags=sqlite

archives:
- name_template: "{{.Binary}}_{{.Os}}_{{.Arch}}"
format_overrides:
- goos: windows
format: zip

release:
draft: true

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

checksum:
name_template: "testfixtures_checksums.txt"

nfpms:
- vendor: testfixtures
homepage: https://github.com/go-testfixtures/testfixtures
maintainer: Andrey Nering <andrey.nering@gmail.com>
description: Ruby on Rails like test fixtures for Go.
license: MIT
formats:
- deb
- rpm
file_name_template: "{{.ProjectName}}_{{.Os}}_{{.Arch}}"
5 changes: 5 additions & 0 deletions Taskfile.yml
Expand Up @@ -54,6 +54,11 @@ tasks:
cmds:
- go test -v -tags {{.DATABASE}}

goreleaser:test:
desc: Tests release process without publishing
cmds:
- goreleaser --snapshot --rm-dist

docker:
cmds:
- task: docker:build
Expand Down

0 comments on commit 3470baa

Please sign in to comment.