Skip to content

Commit

Permalink
ci: add go-releaser
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremy PLANCKEEL <[email protected]>
  • Loading branch information
jplanckeel committed Mar 8, 2024
1 parent fa80b3d commit 60a7a42
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ jobs:
push: true
tags: jplanckeel/scope:${{steps.version_tag.outputs.tag}},jplanckeel/scope:latest

- name: Run GoReleaser
if: "steps.tag.outputs.value != ''"
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --clean

release-check:
if: github.event.action == 'labeled'
runs-on: ubuntu-latest
Expand Down
46 changes: 46 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
before:
hooks:
- go mod tidy
builds:
- env:
- CGO_ENABLED=0
- GO111MODULE=on
- GOPRIVATE=github.com/jplanckeel
goos:
- linux
goarch:
- amd64
- arm64
id: "scope-linux"
binary: "{{ .ProjectName }}.plugin"

- env:
- CGO_ENABLED=0
- GO111MODULE=on
- GOPRIVATE=github.com/jplanckeel
goos:
- darwin
goarch:
- amd64
- arm64
id: "scope-darwin"
binary: "{{ .ProjectName }}.plugin"
flags:
- -tags=netgo

archives:
- format: gz
name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
files:
- none*
checksum:
name_template: "{{ .ProjectName }}_{{ .Version }}_SHA256SUMS"
algorithm: sha256
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"

0 comments on commit 60a7a42

Please sign in to comment.