From 35217febfc2c5d6a7e5d5d2b0b3c10a168fb2ed1 Mon Sep 17 00:00:00 2001 From: James Mills Date: Mon, 1 Aug 2022 03:22:17 +0000 Subject: Add support for multi-arch binary and docker image releases (#20) Reviewed-on: https://git.mills.io/prologic/tube/pulls/20 --- .goreleaser.yml | 102 ++++++++++++++++++++++++++------------------------------ 1 file changed, 47 insertions(+), 55 deletions(-) (limited to '.goreleaser.yml') diff --git a/.goreleaser.yml b/.goreleaser.yml index 0e54a2f..03cde8c 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,8 +1,18 @@ --- builds: - - - flags: -tags "static_build" - ldflags: -w -X git.mills.io/prologic/tube/.Version={{.Version}} -X git.mills.io/prologic/tube/.Commit={{.Commit}} + - id: tube + binary: tube + main: . + flags: + - -installsuffix=netgo + tags: + - embed + - netcgo + - static_build + ldflags: >- + -w + -X git.mills.io/prologic/tube.Version={{.Version}} + -X git.mills.io/prologic/tube.Commit={{.Commit}} env: - CGO_ENABLED=0 goos: @@ -12,57 +22,39 @@ builds: - linux goarch: - amd64 - - arm - arm64 -brews: - - - github: - owner: prologic - name: homebrew-tube - homepage: "https://github.io/prologic/tube" - description: | - tube is a Youtube-like (without censorship and features you don't need!) - Video Sharing App written in Go which also supports automatic - transcoding to MP4 H.265 AAC, multiple collections and RSS feed. - dependencies: - - ffmpeg - plist: | - - - - - LabelTube - ProgramArguments - - /usr/local/bin/tube - /usr/local/etc/tube/config.json - - WorkingDirectory - /usr/local - StandardOutPath/usr/local/log/tube.log - RunAtLoad - KeepAlive - Disabled - - + +dockers: + - image_templates: ["prologic/tube:{{ .Version }}-amd64"] + use: buildx + dockerfile: Dockerfile.goreleaser + build_flag_templates: + - "--platform=linux/amd64" + extra_files: + - ".dockerfiles/entrypoint.sh" + - ".dockerfiles/config.json" + - image_templates: ["prologic/tube:{{ .Version }}-arm64v8"] + use: buildx + goarch: arm64 + dockerfile: Dockerfile.goreleaser + build_flag_templates: + - "--platform=linux/arm64/v8" + extra_files: + - ".dockerfiles/entrypoint.sh" + - ".dockerfiles/config.json" + +docker_manifests: + - name_template: prologic/tube:{{ .Version }} + image_templates: + - prologic/tube:{{ .Version }}-amd64 + - prologic/tube:{{ .Version }}-arm64v8 + signs: - - - artifacts: checksum -archives: - - - replacements: - darwin: Darwin - linux: Linux - windows: Windows - 386: i386 - amd64: x86_64 -checksum: - name_template: 'checksums.txt' -snapshot: - name_template: "{{ .Tag }}-next" -changelog: - sort: asc - filters: - exclude: - - '^docs:' - - '^test:' + - artifacts: checksum +release: + gitea: + owner: prologic + name: tube + draft: false +gitea_urls: + api: https://git.mills.io/api/v1/ -- cgit v1.2.3