Skip to content

Commit fa9ef20

Browse files
integrating goreleaser action. (#19)
* added .goreleaser.yml. * fixed typo in .goreleaser.yml. * Update release.yml
1 parent 53a74b2 commit fa9ef20

File tree

2 files changed

+63
-1
lines changed

2 files changed

+63
-1
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
name: goreleaser
22

33
on:
4-
pull_request:
54
push:
5+
tags:
6+
- v*.*.*
67

78
jobs:
89
goreleaser:

.goreleaser.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# This is an example goreleaser.yaml file with some sane defaults.
2+
# Make sure to check the documentation at http://goreleaser.com
3+
before:
4+
hooks:
5+
# You may remove this if you don't use go modules.
6+
- go mod download
7+
# you may remove this if you don't need go generate
8+
- go generate ./...
9+
builds:
10+
- env:
11+
- CGO_ENABLED=0
12+
archives:
13+
- replacements:
14+
darwin: Darwin
15+
linux: Linux
16+
windows: Windows
17+
386: i386
18+
amd64: x86_64
19+
checksum:
20+
name_template: 'checksums.txt'
21+
snapshot:
22+
name_template: "{{ .Tag }}-next"
23+
changelog:
24+
sort: asc
25+
filters:
26+
exclude:
27+
- '^docs:'
28+
- '^test:'
29+
30+
release:
31+
# Repo in which the release will be created.
32+
# Default is extracted from the origin remote URL or empty if its private hosted.
33+
# Note: it can only be one: either github or gitlab or gitea
34+
github:
35+
owner: timothystiles
36+
name: poly
37+
38+
# IDs of the archives to use.
39+
# Defaults to all.
40+
# ids:
41+
# - foo
42+
# - bar
43+
44+
# If set to true, will not auto-publish the release.
45+
# Default is false.
46+
draft: true
47+
48+
# If set to auto, will mark the release as not ready for production
49+
# in case there is an indicator for this in the tag e.g. v1.0.0-rc1
50+
# If set to true, will mark the release as not ready for production.
51+
# Default is false.
52+
prerelease: auto
53+
54+
# You can change the name of the GitHub release.
55+
# Default is `{{.Tag}}`
56+
name_template: "{{.ProjectName}}-v{{.Version}} {{.Env.USER}}"
57+
58+
# You can disable this pipe in order to not upload any artifacts to
59+
# GitHub.
60+
# Defaults to false.
61+
# disable: true

0 commit comments

Comments
 (0)