New goreleaser config and docker setup (with arm64)

This commit is contained in:
Justin Hawkins 2025-04-25 11:44:59 +09:30
parent d864a8c486
commit b559f15eb1
3 changed files with 31 additions and 11 deletions

View File

@ -1,8 +1,9 @@
version: 2
before: before:
hooks: hooks:
- go mod tidy - go mod tidy
- go test ./... - go test ./...
# - golangci-lint run
builds: builds:
- env: - env:
@ -13,11 +14,11 @@ builds:
- darwin - darwin
archives: archives:
- format: tar.gz - formats: [tar.gz]
# this name template makes the OS and Arch compatible with the results of `uname`. # this name template makes the OS and Arch compatible with the results of `uname`.
name_template: >- name_template: >-
{{ .ProjectName }}_ {{ .ProjectName }}_
{{- .Os }}_ {{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64 {{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386 {{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }} {{- else }}{{ .Arch }}{{ end }}
@ -25,16 +26,28 @@ archives:
# use zip for windows archives # use zip for windows archives
format_overrides: format_overrides:
- goos: windows - goos: windows
format: zip formats: [zip]
changelog: changelog:
skip: true disable: true
dockers: dockers:
- image_templates: - image_templates:
- "tardisx/gropple:{{ .Tag }}" - "tardisx/gropple:{{ .Tag }}-amd64"
- "tardisx/gropple:v{{ .Major }}" use: buildx
- "tardisx/gropple:v{{ .Major }}.{{ .Minor }}" build_flag_templates:
- "tardisx/gropple:latest" - "--pull"
- "--platform=linux/amd64"
- image_templates:
- "tardisx/gropple:{{ .Tag }}-arm64"
use: buildx
build_flag_templates:
- "--pull"
- "--platform=linux/arm64"
goarch: arm64
docker_manifests:
- name_template: "tardisx/gropple:{{ .Tag }}"
image_templates:
- "myorg/myuser:{{ .Tag }}-amd64"
- "myorg/myuser:{{ .Tag }}-arm64"

View File

@ -2,6 +2,13 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
## [v1.1.4] - Unreleased
- Minor refactorings, upgrade dependencies
- Migrate to goreleaser v2 configuration
- Generate arm64 docker builds
## [v1.1.3] - 2024-03-17 ## [v1.1.3] - 2024-03-17
- Code cleanups, better error checking - Code cleanups, better error checking

View File

@ -1,4 +1,4 @@
FROM ubuntu:mantic FROM ubuntu:noble
COPY gropple / COPY gropple /
RUN apt update && apt install -y curl python3 ffmpeg RUN apt update && apt install -y curl python3 ffmpeg