-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
68 lines (68 loc) · 2.59 KB
/
Copy path.goreleaser.yaml
File metadata and controls
68 lines (68 loc) · 2.59 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
---
version: 2
project_name: prem-down
builds:
- main: ./cmd/prem-down
env:
- CGO_ENABLED=0
flags:
- -trimpath
ldflags:
- -s -w -X main.version={{ .Version }}
goos:
- darwin
goarch:
- amd64
- arm64
archives:
- name_template: '{{ .ProjectName }}_binary_macos_{{ .Arch }}'
formats: [tar.gz]
# No checksums.txt: it would cover only the macOS tarballs, not the MSI (built
# in a separate publish.yml job).
checksum:
disable: true
changelog:
use: github-native
# Homebrew tap: GoReleaser generates Casks/prem-down.rb (with archive URLs and
# sha256s matching this release) and pushes it to the lucuma13/homebrew-dit
# tap.
#
# A cask (not a formula) is used because Homebrew steers pre-built binaries
# to casks. The postflight hook strips the com.apple.quarantine attribute so
# the unsigned/unnotarized binary isn't blocked by Gatekeeper on first run,
# then installs the Finder Quick Action ("prem-down integrate on") so editors get
# the right-click action without touching a terminal. The uninstall preflight
# removes the Quick Action while the binary is still staged; it must never
# fail, or it would wedge `brew uninstall`.
homebrew_casks:
- name: prem-down
repository:
owner: lucuma13
name: homebrew-dit
branch: main
token: "{{ .Env.HOMEBREW_TAP_TOKEN }}"
directory: Casks
homepage: "https://github.com/lucuma13/prem-down"
description: "Downgrade Premiere Pro project files so older versions can open them"
commit_author:
name: goreleaser-bot
email: goreleaser-bot@users.noreply.github.com
commit_msg_template: "prem-down: update to {{ .Tag }}"
hooks:
post:
install: |
if OS.mac? && File.exist?("#{staged_path}/prem-down")
system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/prem-down"]
system_command "#{staged_path}/prem-down", args: ["integrate", "on"]
end
pre:
uninstall: |
if OS.mac? && File.exist?("#{staged_path}/prem-down")
system_command "#{staged_path}/prem-down", args: ["integrate", "off"], must_succeed: false
end
# Windows is NOT built or published from here: it ships only as an MSI (so the
# Explorer context menu installs/uninstalls with the package), which GoReleaser
# cannot build. The publish-windows-installer job in publish.yml compiles the Windows
# binary itself, wraps it in an MSI with WiX from packaging/windows/prem-down.wxs,
# uploads the MSI to the GitHub release, and opens the manifest PR against
# microsoft/winget-pkgs from packaging/winget/.