|
| 1 | +version: 2 |
| 2 | + |
| 3 | +project_name: git-profile |
| 4 | + |
| 5 | +before: |
| 6 | + hooks: |
| 7 | + - go mod tidy |
| 8 | + - go vet ./... |
| 9 | + |
| 10 | +builds: |
| 11 | + - id: git-profile |
| 12 | + main: . |
| 13 | + binary: git-profile |
| 14 | + env: |
| 15 | + - CGO_ENABLED=0 |
| 16 | + ldflags: |
| 17 | + - -s -w |
| 18 | + - -X main.version={{.Version}} |
| 19 | + - -X main.commit={{.Commit}} |
| 20 | + - -X main.date={{.Date}} |
| 21 | + goos: |
| 22 | + - linux |
| 23 | + - darwin |
| 24 | + - windows |
| 25 | + goarch: |
| 26 | + - amd64 |
| 27 | + - arm64 |
| 28 | + - arm # linux/arm (armv7 — Raspberry Pi, embedded) |
| 29 | + goarm: |
| 30 | + - "7" |
| 31 | + ignore: |
| 32 | + - goos: windows |
| 33 | + goarch: arm64 |
| 34 | + - goos: windows |
| 35 | + goarch: arm |
| 36 | + - goos: darwin |
| 37 | + goarch: arm |
| 38 | + |
| 39 | +archives: |
| 40 | + - id: default |
| 41 | + format: tar.gz |
| 42 | + name_template: >- |
| 43 | + {{ .ProjectName }}_ |
| 44 | + {{- .Os }}_ |
| 45 | + {{- if eq .Arch "amd64" }}x86_64 |
| 46 | + {{- else if eq .Arch "arm64" }}arm64 |
| 47 | + {{- else if eq .Arch "arm" }}armv7 |
| 48 | + {{- else }}{{ .Arch }}{{ end }} |
| 49 | + format_overrides: |
| 50 | + - goos: windows |
| 51 | + format: zip |
| 52 | + files: |
| 53 | + - LICENSE |
| 54 | + - README.md |
| 55 | + |
| 56 | +checksum: |
| 57 | + name_template: checksums.txt |
| 58 | + algorithm: sha256 |
| 59 | + |
| 60 | +snapshot: |
| 61 | + version_template: "{{ incpatch .Version }}-dev" |
| 62 | + |
| 63 | +changelog: |
| 64 | + sort: asc |
| 65 | + use: github |
| 66 | + filters: |
| 67 | + exclude: |
| 68 | + - "^docs:" |
| 69 | + - "^test:" |
| 70 | + - "^chore:" |
| 71 | + - "^ci:" |
| 72 | + - "Merge pull request" |
| 73 | + - "Merge branch" |
| 74 | + groups: |
| 75 | + - title: "New Features" |
| 76 | + regexp: "^feat" |
| 77 | + order: 0 |
| 78 | + - title: "Bug Fixes" |
| 79 | + regexp: "^fix" |
| 80 | + order: 1 |
| 81 | + - title: "Other" |
| 82 | + order: 999 |
| 83 | + |
| 84 | +# ── macOS / Linux: Homebrew ──────────────────────────────────────────────── |
| 85 | +brews: |
| 86 | + - repository: |
| 87 | + owner: hapiio |
| 88 | + name: homebrew-tap |
| 89 | + token: "{{ .Env.HOMEBREW_TAP_TOKEN }}" |
| 90 | + commit_author: |
| 91 | + name: goreleaserbot |
| 92 | + email: bot@goreleaser.com |
| 93 | + commit_message_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}" |
| 94 | + directory: Formula |
| 95 | + homepage: "https://github.com/hapiio/git-profile" |
| 96 | + description: "Manage multiple git identity profiles with a single command" |
| 97 | + license: "MIT" |
| 98 | + test: | |
| 99 | + system "#{bin}/git-profile", "version" |
| 100 | + install: | |
| 101 | + bin.install "git-profile" |
| 102 | + # Shell completions |
| 103 | + bash_completion.install Utils.safe_popen_read(bin/"git-profile", "completion", "bash") => "git-profile" |
| 104 | + zsh_completion.install Utils.safe_popen_read(bin/"git-profile", "completion", "zsh") => "_git-profile" |
| 105 | + fish_completion.install Utils.safe_popen_read(bin/"git-profile", "completion", "fish") => "git-profile.fish" |
| 106 | +
|
| 107 | +# ── Windows: Scoop ──────────────────────────────────────────────────────── |
| 108 | +# Skipped automatically when SCOOP_BUCKET_TOKEN secret is not configured. |
| 109 | +scoops: |
| 110 | + - repository: |
| 111 | + owner: hapiio |
| 112 | + name: scoop-bucket |
| 113 | + token: "{{ .Env.SCOOP_BUCKET_TOKEN }}" |
| 114 | + commit_author: |
| 115 | + name: goreleaserbot |
| 116 | + email: bot@goreleaser.com |
| 117 | + commit_message_template: "Scoop update for {{ .ProjectName }} version {{ .Tag }}" |
| 118 | + directory: bucket |
| 119 | + homepage: "https://github.com/hapiio/git-profile" |
| 120 | + description: "Manage multiple git identity profiles with a single command" |
| 121 | + license: MIT |
| 122 | + skip_upload: "{{ if not .Env.SCOOP_BUCKET_TOKEN }}true{{ end }}" |
| 123 | + |
| 124 | +# ── Arch Linux: AUR ────────────────────────────────────────────────────── |
| 125 | +aurs: |
| 126 | + - name: git-profile-bin |
| 127 | + homepage: "https://github.com/hapiio/git-profile" |
| 128 | + description: "Manage multiple git identity profiles with a single command" |
| 129 | + maintainers: |
| 130 | + - "hapiio <hapiio at users dot noreply dot github dot com>" |
| 131 | + license: MIT |
| 132 | + private_key: "{{ .Env.AUR_KEY }}" |
| 133 | + git_url: "ssh://aur@aur.archlinux.org/git-profile-bin.git" |
| 134 | + skip_upload: auto # skip if AUR_KEY secret is not set |
| 135 | + package: |- |
| 136 | + install -Dm755 "./git-profile" "${pkgdir}/usr/bin/git-profile" |
| 137 | + install -Dm644 "./LICENSE" "${pkgdir}/usr/share/licenses/git-profile/LICENSE" |
| 138 | + install -Dm644 "./README.md" "${pkgdir}/usr/share/doc/git-profile/README.md" |
| 139 | +
|
| 140 | +# ── Linux: .deb / .rpm ─────────────────────────────────────────────────── |
| 141 | +nfpms: |
| 142 | + - id: packages |
| 143 | + package_name: git-profile |
| 144 | + homepage: https://github.com/hapiio/git-profile |
| 145 | + maintainer: hapiio <hapiio@users.noreply.github.com> |
| 146 | + description: Manage multiple git identity profiles with a single command. |
| 147 | + license: MIT |
| 148 | + formats: |
| 149 | + - deb |
| 150 | + - rpm |
| 151 | + bindir: /usr/bin |
| 152 | + contents: |
| 153 | + - src: ./LICENSE |
| 154 | + dst: /usr/share/licenses/git-profile/LICENSE |
| 155 | + - src: ./README.md |
| 156 | + dst: /usr/share/doc/git-profile/README.md |
0 commit comments