Skip to content

Commit cc8a575

Browse files
authored
build(go): Update goreleaser config file (#632)
1 parent 07e22f1 commit cc8a575

File tree

3 files changed

+23
-11
lines changed

3 files changed

+23
-11
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
clients/go/
2+
!clients/go/.goreleaser.yaml
3+
!clients/go/.github/workflows/release.yml
24

35
clients/python/*
46
!clients/python/test/test_locales_api.py

clients/go/.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ jobs:
1717
with:
1818
go-version: 1.14
1919
- name: Run GoReleaser
20-
uses: goreleaser/goreleaser-action@ac067437f516133269923265894e77920c3dce18 # pin@v2
20+
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # pin@v6
2121
with:
22-
version: latest
22+
version: "~>2.0"
2323
args: release --clean
2424
env:
2525
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

clients/go/.goreleaser.yaml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,34 @@
1-
# Make sure to check the documentation at http://goreleaser.com
1+
# Make sure to check the documentation at https://goreleaser.com
2+
3+
version: 2
4+
25
before:
36
hooks:
47
# You may remove this if you don't use go modules.
58
- go mod tidy
69
builds:
710
- skip: true
811
archives:
9-
- name_template: >-
10-
{{ .ProjectName }}_
11-
{{- title .Os }}_
12-
{{- if eq .Arch "amd64" }}x86_64
13-
{{- else if eq .Arch "386" }}i386
14-
{{- else }}{{ .Arch }}{{ end }}
15-
{{- if .Arm }}v{{ .Arm }}{{ end }}
12+
- format: tar.gz
13+
# this name template makes the OS and Arch compatible with the results of `uname`.
14+
name_template: >-
15+
{{ .ProjectName }}_
16+
{{- title .Os }}_
17+
{{- if eq .Arch "amd64" }}x86_64
18+
{{- else if eq .Arch "386" }}i386
19+
{{- else }}{{ .Arch }}{{ end }}
20+
{{- if .Arm }}v{{ .Arm }}{{ end }}
21+
# use zip for windows archives
22+
format_overrides:
23+
- goos: windows
24+
format: zip
25+
1626
checksum:
1727
name_template: 'checksums.txt'
1828
snapshot:
1929
name_template: "{{ .Tag }}"
2030
changelog:
21-
skip: true
31+
disable: true
2232
release:
2333
github:
2434
owner: phrase

0 commit comments

Comments
 (0)