github.com/projecteru2/core@v0.0.0-20240321043226-06bcc1c23f58/.goreleaser.yml (about)

     1  # This is an example goreleaser.yaml file with some sane defaults.
     2  # Make sure to check the documentation at http://goreleaser.com
     3  before:
     4    hooks:
     5      # You may remove this if you don't use go modules.
     6      - go mod download
     7  
     8  builds:
     9    - id: eru-core-debug
    10      binary: eru-core.dbg
    11      env:
    12        - CGO_ENABLED=0
    13      ldflags:
    14        - -X github.com/projecteru2/core/version.REVISION={{.Commit}}
    15        - -X github.com/projecteru2/core/version.VERSION={{.Env.VERSION}}
    16        - -X github.com/projecteru2/core/version.BUILTAT={{.Date}}
    17      hooks:
    18        post:
    19          - cp {{.Path}} ./eru-core-{{.Os}}.dbg
    20      goos:
    21        - darwin
    22        - linux
    23      goarch:
    24        - amd64
    25  
    26    # the best practice is using prebuilt builder
    27    # however it's a Pro feature
    28    - id: eru-core-linux
    29      binary: eru-core
    30      env:
    31        - CGO_ENABLED=0
    32      ldflags:
    33        - -X github.com/projecteru2/core/version.REVISION={{.Commit}}
    34        - -X github.com/projecteru2/core/version.VERSION={{.Env.VERSION}}
    35        - -X github.com/projecteru2/core/version.BUILTAT={{.Date}}
    36      hooks:
    37        post:
    38          - cp ./eru-core-{{.Os}}.dbg {{.Path}}
    39          - strip {{.Path}}
    40      goos:
    41        - linux
    42      goarch:
    43        - amd64
    44  
    45    - id: eru-core-darwin
    46      binary: eru-core
    47      env:
    48        - CGO_ENABLED=0
    49      ldflags:
    50        - -w -s
    51        - -X github.com/projecteru2/core/version.REVISION={{.Commit}}
    52        - -X github.com/projecteru2/core/version.VERSION={{.Env.VERSION}}
    53        - -X github.com/projecteru2/core/version.BUILTAT={{.Date}}
    54      goos:
    55        - darwin
    56      goarch:
    57        - amd64
    58  
    59  archives:
    60    - id: core
    61      name_template: >-
    62        {{- .ProjectName }}_{{- .Version }}_
    63        {{- title .Os }}_
    64        {{- if eq .Arch "amd64" }}x86_64
    65        {{- else if eq .Arch "386" }}i386
    66        {{- else }}{{ .Arch }}{{ end }}
    67        {{- if .Arm }}v{{ .Arm }}{{ end -}}
    68  
    69  checksum:
    70    name_template: 'checksums.txt'
    71  
    72  release:
    73    prerelease: auto
    74  
    75  snapshot:
    76    name_template: "{{ .Tag }}-next"
    77  
    78  changelog:
    79    sort: asc
    80    filters:
    81      exclude:
    82      - '^docs:'
    83      - '^test:'