Skip to content

Commit

Permalink
chore: added binary release code
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Meier <[email protected]>
  • Loading branch information
astromechza committed May 10, 2024
1 parent 47edb1d commit 7a85734
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,34 @@ jobs:
-
name: Check licenses
run: addlicense -l apache -check -v -ignore '**/*.yaml' -c Humanitec ./*.go ./internal/

release:
if: startsWith(github.ref, 'refs/tags/0.')
needs:
- test
runs-on: ubuntu-latest
permissions: write-all
steps:
-
name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
-
name: Fetch all tags
run: git fetch --force --tags
-
name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }}
42 changes: 42 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Check the documentation at https://goreleaser.com
before:
hooks:
- go mod tidy
builds:
- id: score-k8s
binary: score-k8s
main: ./
ldflags:
- -X github.com/score-spec/score-k8s/internal/version.Version={{ .Version }}
env:
- CGO_ENABLED=0
targets:
- linux_amd64_v1
- linux_arm64
- windows_amd64_v1
- darwin_amd64_v1
- darwin_arm64
archives:
- format_overrides:
- goos: windows
format: zip
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
brews:
- name: score-k8s
homepage: "https://score.dev"
tap:
owner: score-spec
name: homebrew-tap
token: "{{ .Env.TAP_GITHUB_TOKEN }}"
commit_author:
name: rachfop
email: [email protected]

0 comments on commit 7a85734

Please sign in to comment.