| 1 | # GoReleaser config for bookmarks. |
| 2 | # Triggered by tags shaped like `bookmarks/vX.Y.Z`. |
| 3 | version: 2 |
| 4 | |
| 5 | project_name: bookmarks |
| 6 | |
| 7 | before: |
| 8 | hooks: |
| 9 | - go mod tidy |
| 10 | |
| 11 | builds: |
| 12 | - id: bookmarks |
| 13 | main: . |
| 14 | binary: bookmarks |
| 15 | env: |
| 16 | - CGO_ENABLED=0 |
| 17 | goos: |
| 18 | - linux |
| 19 | - darwin |
| 20 | - windows |
| 21 | goarch: |
| 22 | - amd64 |
| 23 | - arm64 |
| 24 | ignore: |
| 25 | - goos: windows |
| 26 | goarch: arm64 |
| 27 | ldflags: |
| 28 | - -s -w |
| 29 | - -X main.version={{.Version}} |
| 30 | - -X main.commit={{.Commit}} |
| 31 | - -X main.date={{.Date}} |
| 32 | |
| 33 | archives: |
| 34 | - id: bookmarks |
| 35 | name_template: >- |
| 36 | {{ .ProjectName }}_{{ .Version }}_ |
| 37 | {{- if eq .Os "darwin" }}macos{{- else }}{{ .Os }}{{ end }}_ |
| 38 | {{- if eq .Arch "amd64" }}x86_64{{- else }}{{ .Arch }}{{ end }} |
| 39 | formats: [tar.gz] |
| 40 | format_overrides: |
| 41 | - goos: windows |
| 42 | formats: [zip] |
| 43 | files: |
| 44 | - README.md |
| 45 | |
| 46 | checksum: |
| 47 | name_template: "checksums.txt" |
| 48 | |
| 49 | snapshot: |
| 50 | version_template: "0.0.0-snapshot-{{.ShortCommit}}" |
| 51 | |
| 52 | changelog: |
| 53 | # Disabled: the workflow's `gh release create --generate-notes` produces the |
| 54 | # real notes on the prefixed `<app>/vX.Y.Z` tag. GoReleaser's GitHub compare |
| 55 | # API uses the stripped version (e.g. v0.4.0), which 404s since the real tag |
| 56 | # is prefixed (e.g. posts/v0.4.0). |
| 57 | disable: true |
| 58 | |
| 59 | release: |
| 60 | # Disabled: workflow uploads artifacts to the real `bookmarks/vX.Y.Z` git tag |
| 61 | # using `gh release create`. GoReleaser OSS can't natively map a stripped |
| 62 | # version back to a prefixed tag without the Pro `monorepo` feature. |
| 63 | disable: true |
| 64 | |
| 65 | brews: |
| 66 | - name: bookmarks |
| 67 | repository: |
| 68 | owner: stevedylandev |
| 69 | name: homebrew-tap |
| 70 | token: "{{ .Env.HOMEBREW_TAP_TOKEN }}" |
| 71 | url_template: "https://github.com/stevedylandev/andromeda/releases/download/bookmarks/v{{ .Version }}/{{ .ArtifactName }}" |
| 72 | homepage: "https://github.com/stevedylandev/andromeda" |
| 73 | description: "Self-hosted link saver with categories and JSON API" |
| 74 | license: "MIT" |
| 75 | commit_author: |
| 76 | name: goreleaserbot |
| 77 | email: bot@goreleaser.com |
| 78 | commit_msg_template: "brew: bookmarks {{ .Tag }}" |
| 79 | directory: Formula |
| 80 | install: | |
| 81 | bin.install "bookmarks" |