Skip to content

Commit 26b1621

Browse files
Creates release workflow with goreleaser
1 parent 4175b3a commit 26b1621

File tree

3 files changed

+64
-0
lines changed

3 files changed

+64
-0
lines changed

.github/workflows/release.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: release
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
permissions:
9+
contents: write
10+
11+
env:
12+
GO111MODULE: on
13+
14+
jobs:
15+
goreleaser:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v2
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Setup Go
24+
uses: actions/setup-go@v2
25+
with:
26+
go-version: 1.16
27+
28+
- name: Run GoReleaser
29+
uses: goreleaser/goreleaser-action@v2
30+
with:
31+
distribution: goreleaser
32+
version: latest
33+
args: release --rm-dist
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

100644100755
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@
2222

2323
# TODO: Remove this guy when development phase end
2424
main
25+
26+
dist/

.goreleaser.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This is an example .goreleaser.yml file with some sensible defaults.
2+
# Make sure to check the documentation at https://goreleaser.com
3+
env:
4+
- GO111MODULE=on
5+
6+
builds:
7+
- main: ./protoc-gen-go-deal/main.go
8+
id: protoc-gen-go-deal
9+
binary: protoc-gen-go-deal
10+
env:
11+
- CGO_ENABLED=0
12+
goos:
13+
- linux
14+
- windows
15+
- darwin
16+
goarch:
17+
- amd64
18+
19+
archives:
20+
- name_template: "{{ .Binary }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}"
21+
format: binary
22+
replacements:
23+
386: i386
24+
amd64: x86_64
25+
26+
changelog:
27+
skip: true

0 commit comments

Comments
 (0)