forked from jbeda/mdreflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
91 lines (83 loc) · 2.83 KB
/
Copy path.goreleaser.yaml
File metadata and controls
91 lines (83 loc) · 2.83 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# goreleaser configuration for mdreflow (docs/design.md, M5 "ship").
# Validate locally with: goreleaser check
version: 2
project_name: mdreflow
before:
hooks:
- go mod tidy
builds:
- id: mdreflow
main: ./cmd/mdreflow
binary: mdreflow
env:
# Pure Go, no cgo: the binaries must run on any machine of the
# target platform without a matching libc.
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
flags:
# Keep local filesystem paths out of the binary.
- -trimpath
ldflags:
# -s -w drops the symbol table and DWARF data; the -X values feed
# cmd/mdreflow's package-level version/commit/date vars, which
# --version prints. A plain "go build" leaves them at their
# dev/none/unknown defaults.
- -s -w
- -X main.version={{ .Version }}
- -X main.commit={{ .Commit }}
- -X main.date={{ .Date }}
archives:
- id: mdreflow
formats: [tar.gz]
format_overrides:
- goos: windows
formats: [zip]
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
files:
- LICENSE
- README.md
checksum:
name_template: "checksums.txt"
# Publishes a cask to the personal tap (brew install jbeda/tap/mdreflow).
# Casks are goreleaser's current recommendation (brews: is deprecated since
# v2.10); the generated cask carries on_linux stanzas too, which Homebrew
# supports since 4.5 (preliminary). The post-install hook strips the
# quarantine attribute since the binaries are not signed or notarized.
homebrew_casks:
- name: mdreflow
binaries:
- mdreflow
homepage: "https://github.com/jbeda/mdreflow"
description: "Reflow Markdown prose: sentence-per-line semantic line breaks by default"
directory: Casks
repository:
owner: jbeda
name: homebrew-tap
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
commit_author:
name: github-actions[bot]
email: 41898282+github-actions[bot]@users.noreply.github.com
hooks:
post:
install: |
if OS.mac?
system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/mdreflow"]
end
# Release notes are curated in CHANGELOG.md and passed in by the release
# workflow via --release-notes (scripts/release-notes.sh); the raw commit
# list is reachable through the compare link those notes end with.
# Do NOT set changelog.disable here: it also discards --release-notes and
# publishes an empty release body (bit v0.1.3; see goreleaser's changelog
# docs). Leaving the changelog enabled is harmless — --release-notes
# overrides whatever it generates.
release:
# v0.x: every release is a pre-release-grade API promise (design.md's
# versioning note), but not marked as a GitHub pre-release.
draft: false
prerelease: auto