# .goreleaser.yml version: 2 project_name: CBZOptimizer release: github: owner: belphemur name: CBZOptimizer archives: - ids: - cbzoptimizer formats: ["tar.zst"] format_overrides: - # Which GOOS to override the format for. goos: windows formats: ["zip"] # Plural form, multiple formats. Since: v2.6 changelog: sort: asc filters: exclude: - "^docs:" - "^test:" - "^chore:" groups: - title: Features regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$' order: 0 - title: "Bug fixes" regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$' order: 1 - title: "Performance" regexp: '^.*?perf(\([[:word:]]+\))??!?:.+$' order: 2 builds: - id: cbzoptimizer main: cmd/cbzoptimizer/main.go goos: - linux - darwin - windows goarch: - amd64 - arm64 ignore: - goos: windows goarch: arm64 # ensures mod timestamp to be the commit timestamp mod_timestamp: "{{ .CommitTimestamp }}" flags: # trims path - -trimpath ldflags: - -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{ .CommitDate }} env: - CGO_ENABLED=0 - id: encoder-setup main: cmd/encoder-setup/main.go binary: encoder-setup goos: - linux goarch: - amd64 - arm64 # ensures mod timestamp to be the commit timestamp mod_timestamp: "{{ .CommitTimestamp }}" flags: # trims path - -trimpath tags: - encoder_setup ldflags: - -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{ .CommitDate }} env: - CGO_ENABLED=0 # config the checksum filename # https://goreleaser.com/customization/checksum checksum: name_template: "checksums.txt" # Change the digests filename: docker_digest: name_template: "digests.txt" # create a source tarball # https://goreleaser.com/customization/source/ source: enabled: true # proxies from the go mod proxy before building # https://goreleaser.com/customization/gomod gomod: proxy: true # creates SBOMs of all archives and the source tarball using syft # https://goreleaser.com/customization/sbom sboms: - artifacts: archive - id: source # Two different sbom configurations need two different IDs artifacts: source # create a docker image # https://goreleaser.com/customization/docker dockers_v2: - id: cbzoptimizer-image ids: - cbzoptimizer - encoder-setup platforms: - linux/amd64 - linux/arm64 images: - "ghcr.io/belphemur/cbzoptimizer" tags: - "{{ .Version }}" - latest annotations: "org.opencontainers.image.description": "CBZOptimizer is a Go-based tool designed to optimize CBZ (Comic Book Zip) and CBR (Comic Book RAR) files by converting images to a specified format and quality. This tool is useful for reducing the size of comic book archives while maintaining acceptable image quality." "org.opencontainers.image.created": "{{.Date}}" "org.opencontainers.image.name": "{{.ProjectName}}" "org.opencontainers.image.revision": "{{.FullCommit}}" "org.opencontainers.image.version": "{{.Version}}" "org.opencontainers.image.source": "{{.GitURL}}" labels: "org.opencontainers.image.created": "{{.Date}}" "org.opencontainers.image.name": "{{.ProjectName}}" "org.opencontainers.image.revision": "{{.FullCommit}}" "org.opencontainers.image.version": "{{.Version}}" "org.opencontainers.image.source": "{{.GitURL}}" "org.opencontainers.image.description": "CBZOptimizer is a Go-based tool designed to optimize CBZ (Comic Book Zip) and CBR (Comic Book RAR) files by converting images to a specified format and quality. This tool is useful for reducing the size of comic book archives while maintaining acceptable image quality." # signs the checksum file # all files (including the sboms) are included in the checksum, so we don't need to sign each one if we don't want to # https://goreleaser.com/customization/sign signs: - cmd: cosign env: - COSIGN_EXPERIMENTAL=1 certificate: "${artifact}.pem" args: - sign-blob - "--output-certificate=${certificate}" - "--output-signature=${signature}" - "${artifact}" - "--yes" # needed on cosign 2.0.0+ artifacts: checksum output: true # signs our docker image # https://goreleaser.com/customization/docker_sign docker_signs: - cmd: cosign env: - COSIGN_EXPERIMENTAL=1 output: true args: - "sign" - "${artifact}" - "--yes" # needed on cosign 2.0.0+