Skip to content

Commit

Permalink
build(go): Update goreleaser config file (#632)
Browse files Browse the repository at this point in the history
  • Loading branch information
jablan authored Jun 12, 2024
1 parent 07e22f1 commit cc8a575
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
clients/go/
!clients/go/.goreleaser.yaml
!clients/go/.github/workflows/release.yml

clients/python/*
!clients/python/test/test_locales_api.py
Expand Down
4 changes: 2 additions & 2 deletions clients/go/.github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
with:
go-version: 1.14
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@ac067437f516133269923265894e77920c3dce18 # pin@v2
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # pin@v6
with:
version: latest
version: "~>2.0"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28 changes: 19 additions & 9 deletions clients/go/.goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,34 @@
# Make sure to check the documentation at http://goreleaser.com
# Make sure to check the documentation at https://goreleaser.com

version: 2

before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
builds:
- skip: true
archives:
- name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of `uname`.
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
# use zip for windows archives
format_overrides:
- goos: windows
format: zip

checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}"
changelog:
skip: true
disable: true
release:
github:
owner: phrase
Expand Down

0 comments on commit cc8a575

Please sign in to comment.