Skip to content

Commit

Permalink
v: updates to workflows for goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
nolanjacobson committed Aug 7, 2024
1 parent b28bd92 commit 750790a
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/.goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Make sure to check the documentation at http://goreleaser.com
version: 2
builds:
- ldflags:
- -w -s
- -X github.com/masa-finance/masa-oracle/internal.Version={{.Tag}}
- -X github.com/masa-finance/masa-oracle/internal.Commit={{.Commit}}
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
- freebsd
goarch:
- amd64
- arm
- 386
- arm64
source:
enabled: true
name_template: '{{ .ProjectName }}-{{ .Tag }}-source'
archives:
# Default template uses underscores instead of -
- name_template: >-
{{ .ProjectName }}-{{ .Tag }}-
{{- if eq .Os "freebsd" }}FreeBSD
{{- else }}{{- title .Os }}{{end}}-
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{end}}
{{- if .Arm }}v{{ .Arm }}{{ end }}
checksum:
name_template: '{{ .ProjectName }}-{{ .Tag }}-checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
- '^Merge pull request'
18 changes: 18 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,21 @@ jobs:
gcloud compute instances add-metadata $INSTANCE --metadata masa-oracle-redeploy=latest --zone=$(echo $ZONE | tr -d '\n')
done
goreleaser: # Add this new job for GoReleaser
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
version: v2.0.1
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 750790a

Please sign in to comment.