Skip to content

Commit

Permalink
feat: support darwin/arm64
Browse files Browse the repository at this point in the history
Signed-off-by: Philippe Scorsolini <[email protected]>
  • Loading branch information
phisco committed Jan 14, 2023
1 parent 07a094a commit 6e3f89f
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 14 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@ jobs:
cmd: ./scripts/check_version.sh plugin.yaml scripts/install_version.sh ${{ github.ref }}
-
name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.15
go-version: 1.19
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26 changes: 20 additions & 6 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,27 @@ builds:
- linux
- darwin
- windows
goarch:
- amd64
- 386
- arm64
- arm
goarm:
- 5
- 6
- 7
ignore:
- goos: darwin
goarch: 386

archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
- id: release
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}{{ .Arm }}
format_overrides:
- goos: windows
format: zip
2 changes: 1 addition & 1 deletion plugin.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "schema-gen"
version: "0.0.4"
version: "0.0.5"
usage: "generate json schema for values yaml"
description: "generate json schema for values yaml"
command: "$HELM_PLUGIN_DIR/bin/helm-schema-gen"
Expand Down
6 changes: 4 additions & 2 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ get_binaries() {
case "$PLATFORM" in
darwin/386) BINARIES="helm-schema-gen" ;;
darwin/amd64) BINARIES="helm-schema-gen" ;;
darwin/arm64) BINARIES="helm-schema-gen" ;;
linux/386) BINARIES="helm-schema-gen" ;;
linux/amd64) BINARIES="helm-schema-gen" ;;
windows/386) BINARIES="helm-schema-gen" ;;
Expand Down Expand Up @@ -104,6 +105,7 @@ adjust_os() {
darwin) OS=Darwin ;;
linux) OS=Linux ;;
windows) OS=Windows ;;
*)
esac
true
}
Expand Down Expand Up @@ -350,7 +352,7 @@ End of functions from https://github.com/client9/shlib
EOF

PROJECT_NAME="helm-schema-gen"
OWNER=karuppiah7890
OWNER=phisco
REPO="helm-schema-gen"
BINARY=helm-schema-gen
FORMAT=tar.gz
Expand Down Expand Up @@ -382,7 +384,7 @@ adjust_arch

log_info "found version: ${VERSION} for ${TAG}/${OS}/${ARCH}"

NAME=${PROJECT_NAME}_${VERSION}_${OS}_${ARCH}
NAME=${PROJECT_NAME}_${OS}_${ARCH}
TARBALL=${NAME}.${FORMAT}
TARBALL_URL=${GITHUB_DOWNLOAD}/${TAG}/${TARBALL}
CHECKSUM=${PROJECT_NAME}_${VERSION}_checksums.txt
Expand Down
2 changes: 1 addition & 1 deletion scripts/install_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
## version of the plugin mentioned
## in the plugin.yaml

./scripts/install.sh "0.0.4"
./scripts/install.sh "0.0.5"

0 comments on commit 6e3f89f

Please sign in to comment.