From c49e3807e9bddce553355c81aeb3ecd54e0507ce Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Wed, 17 Aug 2022 09:01:53 +0000 Subject: [PATCH] Add goreleaser --- packages/goreleaser/build.yaml | 16 ++++++++++++++++ packages/goreleaser/definition.yaml | 10 ++++++++++ 2 files changed, 26 insertions(+) create mode 100644 packages/goreleaser/build.yaml create mode 100644 packages/goreleaser/definition.yaml diff --git a/packages/goreleaser/build.yaml b/packages/goreleaser/build.yaml new file mode 100644 index 0000000..316c257 --- /dev/null +++ b/packages/goreleaser/build.yaml @@ -0,0 +1,16 @@ +requires: +- name: "toolchain-go" + category: "development" + version: ">=1.18" +prelude: +- mkdir go/src/github.com/${GITHUB_ORG}/ -p +- cd go/src/github.com/${GITHUB_ORG}/ && git clone https://github.com/${GITHUB_ORG}/{{ .Values.name }}.git +env: +- GOPATH=/luetbuild/go/ +- GITHUB_ORG={{ ( index .Values.labels "github.owner" ) }} +- CGO_ENABLED=0 +steps: +- cd go/src/github.com/${GITHUB_ORG}/{{ .Values.name }}/ && git checkout v"${PACKAGE_VERSION}" -b build && go build -o {{.Values.name}} && mv {{ .Values.name }} /usr/bin/{{ .Values.name }} +- chmod +x /usr/bin/{{ .Values.name }} +includes: +- /usr/bin/{{.Values.name}} \ No newline at end of file diff --git a/packages/goreleaser/definition.yaml b/packages/goreleaser/definition.yaml new file mode 100644 index 0000000..d8ee86f --- /dev/null +++ b/packages/goreleaser/definition.yaml @@ -0,0 +1,10 @@ +name: goreleaser +category: utils +version: "1.10.3" +description: "Deliver Go binaries as fast and easily as possible" +labels: + github.repo: "goreleaser" + github.owner: "goreleaser" +uri: + - https://github.com/goreleaser/goreleaser +license: "The MIT License" \ No newline at end of file