aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/cli/cross-release.yml
blob: 18e449f3e1a756e48815eda6cf411f08ef070db1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
project_name: turbo
before:
  hooks:
    - make compile-protos
    - go mod tidy

dist: dist-cross

builds:
  - id: turbo
    main: ./cmd/turbo
    tags:
      - rust
      - staticbinary
    binary: bin/go-turbo
    flags:
      - -trimpath
    ldflags:
      - -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.CommitDate}} -X main.builtBy=goreleaser
    mod_timestamp: "{{ .CommitTimestamp }}"
    env:
      - CGO_ENABLED=1
    hooks:
      pre:
        - cmd: make turborepo-ffi-install-{{ .Os }}-{{ .Arch }}
          output: true
    targets:
      - linux_arm64
      - linux_amd64
      - windows_amd64
    overrides:
      - goos: linux
        goarch: arm64
        ldflags: -linkmode external -extldflags="-static" -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.CommitDate}} -X main.builtBy=goreleaser
        env:
          - CC=zig cc -target aarch64-linux-musl
          - CXX=zig c++ -target aarch64-linux-musl
      - goos: linux
        goarch: amd64
        goamd64: v1
        ldflags: -linkmode external -extldflags="-static" -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.CommitDate}} -X main.builtBy=goreleaser
        env:
          - CC=zig cc -target x86_64-linux-musl
          - CXX=zig c++ -target x86_64-linux-musl
      - goos: windows
        goarch: arm64
        env:
          - CC=/llvm-mingw/llvm-mingw/bin/aarch64-w64-mingw32-gcc
          - CXX=/llvm-mingw/llvm-mingw/bin/aarch64-w64-mingw32-g++
      - goos: windows
        goarch: amd64
        goamd64: v1
        env:
          - CC=x86_64-w64-mingw32-gcc
          - CXX=x86_64-w64-mingw32-g++

archives:
  - format: binary

release:
  disable: true