# This is an example .goreleaser.yml file with some sensible defaults. # Make sure to check the documentation at https://goreleaser.com before: hooks: # You may remove this if you don't use go modules. - go mod tidy # you may remove this if you don't need go generate - go generate ./... builds: - env: [ CGO_ENABLED=0 ] goos: - linux - windows - darwin - freebsd - openbsd goarch: - amd64 - arm64 - arm goarm: - 7 ignore: - goos: windows goarch: arm - goos: darwin goarch: arm - goos: freebsd goarch: arm - goos: openbsd goarch: arm id: "{{ .Env.CUSTOM_PROJ_NAME }}" binary: "{{ .Env.CUSTOM_PROJ_NAME }}" dockers: - image_templates: - "docker.io/engigu/{{ .Env.DOCKER_IMAGE_NAME }}:{{ .Version }}-amd64" - "ghcr.io/engigu/{{ .Env.DOCKER_IMAGE_NAME }}:{{ .Version }}-amd64" dockerfile: Dockerfile.release extra_files: - LICENSE - README.md use: buildx build_flag_templates: - --platform=linux/amd64 - --label=org.opencontainers.image.title={{ .ProjectName }} - --label=org.opencontainers.image.description={{ .ProjectName }} - --label=org.opencontainers.image.url=https://github.com/engigu/{{ .ProjectName }} - --label=org.opencontainers.image.source=https://github.com/engigu/{{ .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 }} - --label=org.opencontainers.image.licenses=MIT - image_templates: - "docker.io/engigu/{{ .Env.DOCKER_IMAGE_NAME }}:{{ .Version }}-arm64v8" - "ghcr.io/engigu/{{ .Env.DOCKER_IMAGE_NAME }}:{{ .Version }}-arm64v8" goarch: arm64 dockerfile: Dockerfile.release extra_files: - LICENSE - README.md use: buildx build_flag_templates: - --platform=linux/arm64/v8 - --label=org.opencontainers.image.title={{ .ProjectName }} - --label=org.opencontainers.image.description={{ .ProjectName }} - --label=org.opencontainers.image.url=https://github.com/engigu/{{ .ProjectName }} - --label=org.opencontainers.image.source=https://github.com/engigu/{{ .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 }} - --label=org.opencontainers.image.licenses=MIT - image_templates: - "docker.io/engigu/{{ .Env.DOCKER_IMAGE_NAME }}:{{ .Version }}-armv7" - "ghcr.io/engigu/{{ .Env.DOCKER_IMAGE_NAME }}:{{ .Version }}-armv7" goarch: arm goarm: 7 dockerfile: Dockerfile.release extra_files: - LICENSE - README.md use: buildx build_flag_templates: - --platform=linux/arm/v7 - --label=org.opencontainers.image.title={{ .ProjectName }} - --label=org.opencontainers.image.description={{ .ProjectName }} - --label=org.opencontainers.image.url=https://github.com/engigu/{{ .ProjectName }} - --label=org.opencontainers.image.source=https://github.com/engigu/{{ .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 }} - --label=org.opencontainers.image.licenses=MIT docker_manifests: - name_template: docker.io/engigu/{{ .Env.DOCKER_IMAGE_NAME }}:{{ .Version }} image_templates: - docker.io/engigu/{{ .Env.DOCKER_IMAGE_NAME }}:{{ .Version }}-amd64 - docker.io/engigu/{{ .Env.DOCKER_IMAGE_NAME }}:{{ .Version }}-arm64v8 - docker.io/engigu/{{ .Env.DOCKER_IMAGE_NAME }}:{{ .Version }}-armv7 - name_template: docker.io/engigu/{{ .Env.DOCKER_IMAGE_NAME }}:latest image_templates: - docker.io/engigu/{{ .Env.DOCKER_IMAGE_NAME }}:{{ .Version }}-amd64 - docker.io/engigu/{{ .Env.DOCKER_IMAGE_NAME }}:{{ .Version }}-arm64v8 - docker.io/engigu/{{ .Env.DOCKER_IMAGE_NAME }}:{{ .Version }}-armv7 - name_template: ghcr.io/engigu/{{ .Env.DOCKER_IMAGE_NAME }}:{{ .Version }} image_templates: - ghcr.io/engigu/{{ .Env.DOCKER_IMAGE_NAME }}:{{ .Version }}-amd64 - ghcr.io/engigu/{{ .Env.DOCKER_IMAGE_NAME }}:{{ .Version }}-arm64v8 - ghcr.io/engigu/{{ .Env.DOCKER_IMAGE_NAME }}:{{ .Version }}-armv7 - name_template: ghcr.io/engigu/{{ .Env.DOCKER_IMAGE_NAME }}:latest image_templates: - ghcr.io/engigu/{{ .Env.DOCKER_IMAGE_NAME }}:{{ .Version }}-amd64 - ghcr.io/engigu/{{ .Env.DOCKER_IMAGE_NAME }}:{{ .Version }}-arm64v8 - ghcr.io/engigu/{{ .Env.DOCKER_IMAGE_NAME }}:{{ .Version }}-armv7 archives: - format: tar.gz # this name template makes the OS and Arch compatible with the results of uname. # {{ .ProjectName }}_ name_template: >- {{ .Env.CUSTOM_PROJ_NAME }}_ {{- title .Os }}_ {{- if eq .Arch "amd64" }}x86_64 {{- else }}{{ .Arch }}{{ end }} {{- if .Arm }}v{{ .Arm }}{{ end }} # use zip for windows archives format_overrides: - goos: windows format: zip files: - LICENSE - README.md - conf/* checksum: name_template: 'checksums.txt' snapshot: name_template: "{{ incpatch .Version }}-next" changelog: sort: asc filters: exclude: - '^docs:' - '^test:' # The lines beneath this are called `modelines`. See `:help modeline` # Feel free to remove those if you don't want/use them. # yaml-language-server: $schema=https://goreleaser.com/static/schema.json # vim: set ts=2 sw=2 tw=0 fo=cnqoj