Skip to content

Commit 5a957cd

Browse files
author
GitHub Actions
committed
Add go releaser
1 parent f04f8c8 commit 5a957cd

File tree

6 files changed

+57
-781
lines changed

6 files changed

+57
-781
lines changed

.github/workflows/release.yml

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

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
dist/

.goreleaser.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
before:
2+
hooks:
3+
- go mod tidy
4+
builds:
5+
- env:
6+
- CGO_ENABLED=0
7+
goos:
8+
- linux
9+
archives:
10+
- replacements:
11+
linux: Linux
12+
checksum:
13+
name_template: 'checksums.txt'
14+
snapshot:
15+
name_template: "{{ incpatch .Version }}-next"
16+
changelog:
17+
sort: asc
18+
filters:
19+
exclude:
20+
- '^docs:'
21+
- '^test:'

go.mod

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,4 @@ module github.com/charlieegan3/fetch-release-binary
22

33
go 1.16
44

5-
require (
6-
github.com/google/go-github/v39 v39.0.0
7-
golang.org/x/build v0.0.0-20210910204607-15e3ac06db6c
8-
)
5+
require github.com/google/go-github/v39 v39.0.0

0 commit comments

Comments
 (0)