From ae719a8e195a5f460c8ff8b21356179963c8eb06 Mon Sep 17 00:00:00 2001 From: vt-idiot <81622808+vt-idiot@users.noreply.github.com> Date: Mon, 24 Apr 2023 13:02:28 -0400 Subject: [PATCH] Revert "Update .goreleaser.yml" This reverts commit 97a971cbabdcb662e668466550d569a122927b4b. --- .goreleaser.yml | 126 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 126 insertions(+) diff --git a/.goreleaser.yml b/.goreleaser.yml index 74a58c369..724ff56b1 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -4,6 +4,42 @@ before: - go generate ./... builds: +- id: xbvr-mac-intel + binary: xbvr +# main: pkg/tray/main.go + flags: + - -tags=json1 + ldflags: + - -s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.Date}} + env: + - CGO_ENABLED=1 + - CC=o64-clang + - CXX=o64-clang++ + goos: + - darwin + goarch: + - amd64 +# hooks: +# post: ./appify.sh -s ./dist/xbvr-mac_darwin_amd64/XBVR.app/Contents/MacOS/XBVR -i ./ui/public/icons/xbvr-mac.icns -n XBVR + +- id: xbvr-mac-m1 + binary: xbvr +# main: pkg/tray/main.go + flags: + - -tags=json1 + ldflags: + - -s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.Date}} + env: + - CGO_ENABLED=1 + - CC=oa64-clang + - CXX=oa64-clang++ + goos: + - darwin + goarch: + - arm64 +# hooks: +# post: ./appify.sh -s ./dist/xbvr-mac_darwin_amd64/XBVR.app/Contents/MacOS/XBVR -i ./ui/public/icons/xbvr-mac.icns -n XBVR + - id: xbvr-windows binary: xbvr main: pkg/tray/main.go @@ -20,6 +56,43 @@ builds: goarch: - amd64 +- id: xbvr-linux-amd64 + binary: xbvr + flags: + - -tags=json1 + env: + - CGO_ENABLED=1 + goos: + - linux + goarch: + - amd64 + +- id: xbvr-linux-arm64 + binary: xbvr + flags: + - -tags=json1 + env: + - CGO_ENABLED=1 + - CC=aarch64-linux-gnu-gcc + goos: + - linux + goarch: + - arm64 + +- id: xbvr-linux-armv7 + binary: xbvr + flags: + - -tags=json1 + env: + - CGO_ENABLED=1 + - CC=arm-linux-gnueabihf-gcc + goos: + - linux + goarch: + - arm + goarm: + - 7 + dockers: - use: buildx @@ -36,22 +109,75 @@ dockers: - --label=org.opencontainers.image.version={{ .Version }} - --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }} - --label=org.opencontainers.image.revision={{ .FullCommit }} + - + use: buildx + dockerfile: Dockerfile + goos: linux + goarch: arm64 + image_templates: + - ghcr.io/{{.Env.GITHUB_USER}}/{{.Env.GITHUB_PROJECT}}:{{ .Version }}-arm64 + build_flag_templates: + - --platform=linux/arm64 + - --no-cache + - --label=org.opencontainers.image.source=https://github.com/{{.Env.GITHUB_USER}}/{{.Env.GITHUB_PROJECT}} + - --label=org.opencontainers.image.title={{ .ProjectName }} + - --label=org.opencontainers.image.version={{ .Version }} + - --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }} + - --label=org.opencontainers.image.revision={{ .FullCommit }} + - + use: buildx + dockerfile: Dockerfile + goos: linux + goarch: arm + goarm: 7 + image_templates: + - ghcr.io/{{.Env.GITHUB_USER}}/{{.Env.GITHUB_PROJECT}}:{{ .Version }}-armv7 + build_flag_templates: + - --platform=linux/arm/v7 + - --no-cache + - --label=org.opencontainers.image.source=https://github.com/{{.Env.GITHUB_USER}}/{{.Env.GITHUB_PROJECT}} + - --label=org.opencontainers.image.title={{ .ProjectName }} + - --label=org.opencontainers.image.version={{ .Version }} + - --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }} + - --label=org.opencontainers.image.revision={{ .FullCommit }} docker_manifests: - name_template: ghcr.io/{{.Env.GITHUB_USER}}/{{.Env.GITHUB_PROJECT}}:{{ .Version }} image_templates: - ghcr.io/{{.Env.GITHUB_USER}}/{{.Env.GITHUB_PROJECT}}:{{ .Version }}-amd64 + - ghcr.io/{{.Env.GITHUB_USER}}/{{.Env.GITHUB_PROJECT}}:{{ .Version }}-arm64 + - ghcr.io/{{.Env.GITHUB_USER}}/{{.Env.GITHUB_PROJECT}}:{{ .Version }}-armv7 - name_template: ghcr.io/{{.Env.GITHUB_USER}}/{{.Env.GITHUB_PROJECT}}:latest image_templates: - ghcr.io/{{.Env.GITHUB_USER}}/{{.Env.GITHUB_PROJECT}}:{{ .Version }}-amd64 + - ghcr.io/{{.Env.GITHUB_USER}}/{{.Env.GITHUB_PROJECT}}:{{ .Version }}-arm64 + - ghcr.io/{{.Env.GITHUB_USER}}/{{.Env.GITHUB_PROJECT}}:{{ .Version }}-armv7 archives: +- id: archive-linux + builds: + - xbvr-linux-amd64 + - xbvr-linux-arm64 + - xbvr-linux-armv7 + replacements: + linux: Linux + windows: Windows + amd64: x86_64 - id: archive-win builds: - xbvr-windows format: zip replacements: windows: Windows +- id: archive-mac + builds: + - xbvr-mac-intel + - xbvr-mac-m1 + format: zip + replacements: + darwin: macOS + amd64: intel + arm64: m1 # files: # - XBVR.app/Contents/Resources/XBVR.icns # - XBVR.app/Contents/Info.plist