Skip to content

Commit

Permalink
set up goreleaser with github action (#725)
Browse files Browse the repository at this point in the history
* add goreleaser

* Create release.yml

* setup github action

* rename to RELEASE_TOKEN

* newline at eol

* remove registry binary
  • Loading branch information
yihanzhen authored Jun 1, 2020
1 parent a873a21 commit 96cf69f
Show file tree
Hide file tree
Showing 4 changed files with 917 additions and 8 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: goreleaser

on:
push:
tags:
- '*'

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Unshallow
run: git fetch --prune --unshallow
-
name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.14
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
36 changes: 36 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
# before:
# hooks:
# # You may remove this if you don't use go modules.
# - go mod download
# # you may remove this if you don't need go generate
# - go generate ./...
builds:
- id: crane
env:
- CGO_ENABLED=0
main: ./cmd/crane/main.go
binary: crane
- id: gcrane
env:
- CGO_ENABLED=0
main: ./cmd/gcrane/main.go
binary: gcrane
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:'
66 changes: 58 additions & 8 deletions go.mod

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 96cf69f

Please sign in to comment.