Skip to content
This repository was archived by the owner on Apr 1, 2024. It is now read-only.

Commit e04d985

Browse files
committed
added goreleaser
1 parent 2cdb665 commit e04d985

File tree

2 files changed

+92
-0
lines changed

2 files changed

+92
-0
lines changed

.github/workflows/release.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: goreleaser
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
goreleaser:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
- name: Set up Go
15+
uses: actions/setup-go@v2
16+
with:
17+
go-version: '^1.16.2'
18+
- name: Run GoReleaser
19+
uses: goreleaser/goreleaser-action@v2
20+
with:
21+
version: latest
22+
args: release --rm-dist
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
release:
2+
3+
before:
4+
hooks:
5+
- go mod tidy
6+
7+
builds:
8+
- id: gqldoc
9+
main: ./cmd/gqldoc/main.go
10+
binary: gqldoc
11+
env:
12+
- CGO_ENABLED=0
13+
ldflags: -s -w -X main.Version={{.Version}}
14+
goos:
15+
- linux
16+
- darwin
17+
- windows
18+
goarch:
19+
- 386
20+
- amd64
21+
- arm
22+
- arm64
23+
goarm:
24+
- 6
25+
- 7
26+
ignore:
27+
- goos: darwin
28+
goarch: 386
29+
- goos: linux
30+
goarch: arm
31+
goarm: 7
32+
33+
archives:
34+
- builds:
35+
- gqldoc
36+
name_template: 'gqldoc_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
37+
replacements:
38+
darwin: macOS
39+
linux: Linux
40+
windows: Windows
41+
386: i386
42+
amd64: x86_64
43+
format_overrides:
44+
- goos: windows
45+
format: zip
46+
47+
brews:
48+
- name: gqldoc
49+
tap:
50+
owner: Code-Hex
51+
name: homebrew-tap
52+
homepage: "https://github.com/Code-Hex/gqldoc"
53+
description: "The easiest way to make documents for GraphQL"
54+
folder: Formula
55+
install: |
56+
bin.install "gqldoc"
57+
58+
checksum:
59+
name_template: 'checksums.txt'
60+
61+
changelog:
62+
sort: asc
63+
filters:
64+
exclude:
65+
- '^docs:'
66+
- '^test:'
67+
- Merge pull request
68+
- Merge branch

0 commit comments

Comments
 (0)