|
1 | | -project_name: timoni |
| 1 | +version: 2 |
| 2 | + |
| 3 | +# xref: https://goreleaser.com/customization/hooks/ |
| 4 | +before: |
| 5 | + hooks: |
| 6 | + - go mod download |
| 7 | + |
| 8 | +# xref: https://goreleaser.com/customization/env/ |
| 9 | +env: |
| 10 | + - CGO_ENABLED=0 |
| 11 | + |
| 12 | +# xref: https://goreleaser.com/customization/changelog/ |
2 | 13 | changelog: |
3 | 14 | use: github-native |
| 15 | + |
| 16 | +# xref: https://goreleaser.com/customization/build/ |
4 | 17 | builds: |
5 | 18 | - <<: &build_defaults |
6 | | - binary: timoni |
7 | | - main: ./cmd/timoni |
| 19 | + main: ./cmd/{{ .ProjectName }} |
8 | 20 | ldflags: |
9 | 21 | - -s -w -X main.VERSION={{ .Version }} |
10 | | - env: |
11 | | - - CGO_ENABLED=0 |
12 | | - id: linux |
| 22 | + id: linux-build |
13 | 23 | goos: |
14 | 24 | - linux |
15 | 25 | goarch: |
16 | 26 | - amd64 |
17 | 27 | - arm64 |
18 | 28 | - <<: *build_defaults |
19 | | - id: darwin |
| 29 | + id: darwin-build |
20 | 30 | goos: |
21 | 31 | - darwin |
22 | 32 | goarch: |
23 | 33 | - amd64 |
24 | 34 | - arm64 |
25 | 35 | - <<: *build_defaults |
26 | | - id: windows |
| 36 | + id: windows-build |
27 | 37 | goos: |
28 | 38 | - windows |
29 | 39 | goarch: |
30 | 40 | - amd64 |
| 41 | + - arm64 |
| 42 | + |
| 43 | +# xref: https://goreleaser.com/customization/archive/ |
31 | 44 | archives: |
32 | 45 | - name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" |
33 | | - id: nix |
34 | | - builds: [darwin, linux] |
35 | | - format: tar.gz |
| 46 | + id: unix-cli |
| 47 | + ids: |
| 48 | + - darwin-build |
| 49 | + - linux-build |
| 50 | + formats: |
| 51 | + - tar.gz |
36 | 52 | files: |
37 | 53 | - LICENSE |
38 | 54 | - name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" |
39 | | - id: windows |
40 | | - builds: [windows] |
41 | | - format: zip |
| 55 | + id: windows-cli |
| 56 | + ids: |
| 57 | + - windows-build |
| 58 | + formats: |
| 59 | + - zip |
42 | 60 | files: |
43 | 61 | - LICENSE |
| 62 | + |
| 63 | +# xref: https://goreleaser.com/customization/checksum/ |
| 64 | +checksum: |
| 65 | + algorithm: sha256 |
| 66 | + |
| 67 | +# xref: https://goreleaser.com/customization/source/ |
44 | 68 | source: |
45 | 69 | enabled: true |
46 | 70 | name_template: '{{ .ProjectName }}_{{ .Version }}_source_code' |
| 71 | + |
| 72 | +# xref: https://goreleaser.com/customization/sbom/ |
47 | 73 | sboms: |
48 | 74 | - id: source |
49 | 75 | artifacts: source |
50 | 76 | documents: |
51 | 77 | - "{{ .ProjectName }}_{{ .Version }}_sbom.spdx.json" |
52 | | -brews: |
53 | | - - name: timoni |
54 | | - repository: |
55 | | - owner: stefanprodan |
56 | | - name: homebrew-tap |
57 | | - branch: main |
58 | | - token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}" |
59 | | - directory: Formula |
60 | | - homepage: "https://timoni.sh" |
61 | | - description: "Timoni CLI" |
62 | | - dependencies: |
63 | | - - name: cue |
64 | | - type: optional |
65 | | - - name: diffutils |
66 | | - type: optional |
67 | | - install: | |
68 | | - bin.install "timoni" |
69 | | - bash_output = Utils.safe_popen_read(bin/"timoni", "completion", "bash") |
70 | | - (bash_completion/"timoni").write bash_output |
71 | | - zsh_output = Utils.safe_popen_read(bin/"timoni", "completion", "zsh") |
72 | | - (zsh_completion/"_timoni").write zsh_output |
73 | | - fish_output = Utils.safe_popen_read(bin/"timoni", "completion", "fish") |
74 | | - (fish_completion/"timoni.fish").write fish_output |
75 | | - test: | |
76 | | - system "#{bin}/timoni version" |
|
0 commit comments