Skip to content

Commit e62c46d

Browse files
authored
Add a goreleaser configuration and workflow (#205)
* Add a .goreleaser.yml configuration * Add a release workflow to run goreleaser action
1 parent 22df7e6 commit e62c46d

File tree

3 files changed

+55
-0
lines changed

3 files changed

+55
-0
lines changed

.github/workflows/release.yaml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
name: Release
3+
4+
on:
5+
push:
6+
tags:
7+
- '*'
8+
9+
jobs:
10+
release:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
with:
15+
fetch-depth: 0
16+
- uses: actions/setup-go@v2
17+
with:
18+
go-version: '^1.15.6'
19+
20+
- uses: goreleaser/goreleaser-action@v2
21+
with:
22+
distribution: goreleaser
23+
version: latest
24+
args: release --rm-dist
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist/

.goreleaser.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
env:
2+
- GO111MODULE=on
3+
4+
before:
5+
hooks:
6+
- go mod tidy
7+
- go generate ./...
8+
9+
builds:
10+
- main: ./cmd/desync
11+
goos:
12+
- linux
13+
- darwin
14+
- windows
15+
ignore:
16+
- goos: darwin
17+
goarch: arm64
18+
- goos: windows
19+
goarch: arm64
20+
21+
checksum:
22+
name_template: 'checksums.txt'
23+
24+
snapshot:
25+
name_template: "{{ incpatch .Version }}-next"
26+
27+
changelog:
28+
sort: asc

0 commit comments

Comments
 (0)