github.com/yoheimuta/protolint@v0.49.8-0.20240515023657-4ecaebb7575d/.goreleaser.yml (about)

     1  ---
     2  before:
     3    hooks:
     4      - go mod download
     5  builds:
     6    -
     7      id: protolint
     8      env:
     9        - CGO_ENABLED=0
    10      main: ./cmd/protolint/main.go
    11      binary: protolint
    12      goos:
    13        - windows
    14        - darwin
    15        - linux
    16      goarch:
    17        - amd64
    18        - arm
    19        - arm64
    20      goarm:
    21        - 6
    22        - 7
    23      ignore:
    24        - goos: windows
    25          goarch: arm
    26          goarm: 6
    27        - goos: windows
    28          goarch: arm
    29          goarm: 7
    30      ldflags:
    31        - -s -w -X github.com/yoheimuta/protolint/internal/cmd.version={{.Version}} -X github.com/yoheimuta/protolint/internal/cmd.revision={{.ShortCommit}}  # yamllint disable-line rule:line-length
    32    -
    33      id: protoc-gen-protolint
    34      env:
    35        - CGO_ENABLED=0
    36      main: ./cmd/protoc-gen-protolint/main.go
    37      binary: protoc-gen-protolint
    38      goos:
    39        - windows
    40        - darwin
    41        - linux
    42      goarch:
    43        - amd64
    44        - arm
    45        - arm64
    46      goarm:
    47        - 6
    48        - 7
    49      ignore:
    50        - goos: windows
    51          goarch: arm
    52          goarm: 6
    53        - goos: windows
    54          goarch: arm
    55          goarm: 7
    56      ldflags:
    57        - -s -w -X github.com/yoheimuta/protolint/internal/cmd/protocgenprotolint.version={{.Version}} -X github.com/yoheimuta/protolint/internal/cmd/protocgenprotolint.revision={{.ShortCommit}}  # yamllint disable-line rule:line-length
    58  archives:
    59  checksum:
    60    name_template: checksums.txt
    61  snapshot:
    62    name_template: "{{ .Tag }}-next"
    63  changelog:
    64    sort: asc
    65    filters:
    66      exclude:
    67        - '^docs:'
    68        - '^test:'
    69  brews:
    70    -
    71      name: protolint
    72      tap:
    73        owner: yoheimuta
    74        name: homebrew-protolint
    75      commit_author:
    76        name: goreleaserbot
    77        email: yoheimuta@gmail.com
    78      folder: Formula
    79      description: Pluggable tool to enforce Protocol Buffer style and conventions
    80      homepage: https://github.com/yoheimuta/protolint
    81      test: |
    82        system "#{bin}/protolint", "version"
    83        system "#{bin}/protoc-gen-protolint", "version"
    84      install: |
    85        bin.install "protolint"
    86        bin.install "protoc-gen-protolint"
    87        prefix.install "LICENSE"
    88  docker_manifests:
    89    # https://goreleaser.com/customization/docker_manifest/
    90    - name_template: yoheimuta/{{ .ProjectName }}:{{ .Version }}
    91      image_templates:
    92        - yoheimuta/{{ .ProjectName }}:{{ .Tag }}-amd64
    93        - yoheimuta/{{ .ProjectName }}:{{ .Tag }}-arm64v8
    94        - yoheimuta/{{ .ProjectName }}:{{ .Tag }}-armv6
    95        - yoheimuta/{{ .ProjectName }}:{{ .Tag }}-armv7
    96    - name_template: yoheimuta/{{ .ProjectName }}:latest
    97      image_templates:
    98        - yoheimuta/{{ .ProjectName }}:latest-amd64
    99        - yoheimuta/{{ .ProjectName }}:latest-arm64v8
   100        - yoheimuta/{{ .ProjectName }}:latest-armv6
   101        - yoheimuta/{{ .ProjectName }}:latest-armv7
   102  dockers:
   103    # https://goreleaser.com/customization/docker/
   104    - use: buildx
   105      goos: linux
   106      goarch: amd64
   107      image_templates:
   108        - yoheimuta/{{ .ProjectName }}:{{ .Tag }}-amd64
   109        - yoheimuta/{{ .ProjectName }}:latest-amd64
   110      build_flag_templates:
   111        - --platform=linux/amd64
   112        - --label=org.opencontainers.image.created={{.Date}}
   113        - --label=org.opencontainers.image.title={{.ProjectName}}
   114        - --label=org.opencontainers.image.revision={{.FullCommit}}
   115        - --label=org.opencontainers.image.version={{.Version}}
   116    - use: buildx
   117      goos: linux
   118      goarch: arm64
   119      image_templates:
   120        - yoheimuta/{{ .ProjectName }}:{{ .Tag }}-arm64v8
   121        - yoheimuta/{{ .ProjectName }}:latest-arm64v8
   122      build_flag_templates:
   123        - --platform=linux/arm64/v8
   124        - --label=org.opencontainers.image.created={{.Date}}
   125        - --label=org.opencontainers.image.title={{.ProjectName}}
   126        - --label=org.opencontainers.image.revision={{.FullCommit}}
   127        - --label=org.opencontainers.image.version={{.Version}}
   128    - use: buildx
   129      goos: linux
   130      goarch: arm
   131      goarm: 6
   132      image_templates:
   133        - yoheimuta/{{ .ProjectName }}:{{ .Tag }}-armv6
   134        - yoheimuta/{{ .ProjectName }}:latest-armv6
   135      build_flag_templates:
   136        - --platform=linux/arm/v6
   137        - --label=org.opencontainers.image.created={{.Date}}
   138        - --label=org.opencontainers.image.title={{.ProjectName}}
   139        - --label=org.opencontainers.image.revision={{.FullCommit}}
   140        - --label=org.opencontainers.image.version={{.Version}}
   141    - use: buildx
   142      goos: linux
   143      goarch: arm
   144      goarm: 7
   145      image_templates:
   146        - yoheimuta/{{ .ProjectName }}:{{ .Tag }}-armv7
   147        - yoheimuta/{{ .ProjectName }}:latest-armv7
   148      build_flag_templates:
   149        - --platform=linux/arm/v7
   150        - --label=org.opencontainers.image.created={{.Date}}
   151        - --label=org.opencontainers.image.title={{.ProjectName}}
   152        - --label=org.opencontainers.image.revision={{.FullCommit}}
   153        - --label=org.opencontainers.image.version={{.Version}}