-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
207 lines (196 loc) · 6.24 KB
/
Copy path.goreleaser.yaml
File metadata and controls
207 lines (196 loc) · 6.24 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
version: 2
project_name: openrun
release:
github:
owner: openrundev
name: openrun
name_template: "Release {{.Tag}}"
draft: false
prerelease: "auto"
before:
hooks:
- go mod download
- go mod tidy
- git clone --single-branch --depth 1 https://github.com/openrundev/appspecs.git
- rm -rf appspecs/.git
- rm -rf internal/server/appspecs
- mv appspecs internal/server
- git clone --single-branch --depth 1 https://github.com/openrundev/apps.git
- cp internal/server/list_apps/embed.go .
- rm -rf internal/server/list_apps
- mv apps/openrun/list_apps internal/server
- mv embed.go internal/server/list_apps/
- rm -rf apps
# skipped when GOOS is set (the sign-windows job cross-builds the Windows
# exe, and -race needs cgo which is off for cross builds); the release run
# has no GOOS set and gates publishing on the full test suite
- sh -c 'if [ -z "$GOOS" ]; then go test -race ./...; fi'
builds:
- id: openrun
main: ./cmd/openrun
binary: openrun
flags:
- -trimpath
ldflags:
- -w
- -X github.com/openrundev/openrun/internal/types.gitCommit={{.ShortCommit}}
- -X github.com/openrundev/openrun/internal/types.gitVersion={{.Version}}
env:
- GO111MODULE=on
- CGO_ENABLED=0
goos:
- darwin
- linux
- windows
- freebsd
goarch:
- amd64
- arm64
ignore:
- goos: freebsd
goarch: arm64
- goos: windows
goarch: arm64
hooks:
# Swap in the SignPath Authenticode-signed windows binary before it is
# archived, so the exe inside the winget zip is signed. No-op for other
# platforms and when SIGNED_WINDOWS_BINARY is not set (local/snapshot
# builds).
post:
- cmd: ./deploy/sign-windows.sh "{{ .Path }}"
output: true
nfpms:
- file_name_template: "{{.ProjectName}}-{{.Tag}}-{{.Arch}}{{if .Arm}}{{.Arm}}{{end}}"
homepage: https://openrun.dev/
description: Open source alternative to Google Cloud Run and AWS App Runner.
maintainer: Ajay Kidave <contact@openrun.dev>
license: Apache 2.0
vendor: ClaceIO LLC.
formats:
- deb
- rpm
contents:
- src: /usr/bin/openrun
dst: /usr/local/bin/openrun
type: "symlink"
checksum:
name_template: "SHA256SUMS"
algorithm: sha256
archives:
- name_template: "{{.ProjectName}}-{{.Tag}}-{{.Os}}-{{.Arch}}{{if .Arm}}{{.Arm}}{{end}}"
id: zip-archives
wrap_in_directory: true
format: zip
files:
- README.md
- LICENSE
- name_template: "{{.ProjectName}}-{{.Tag}}-{{.Os}}-{{.Arch}}{{if .Arm}}{{.Arm}}{{end}}"
id: targz-archives
wrap_in_directory: true
format: tar.gz
files:
- README.md
- LICENSE
# https://goreleaser.com/customization/changelog/
changelog:
use: github
sort: asc
groups:
- title: "New Features"
regexp: "^.*feat[(\\w)]*:+.*$"
order: 0
- title: "Bug Fixes"
regexp: "^.*fix[(\\w)]*:+.*$"
order: 10
- title: "Dependencies"
regexp: "^.*deps[(\\w)]*:+.*$"
order: 30
- title: Other
order: 999
brews:
- name: openrun
homepage: https://openrun.dev
ids: [targz-archives]
repository:
owner: openrundev
name: homebrew-openrun
dependencies:
- name: "mkcert"
service: |
run [ opt_bin/"openrun", "server", "start" ]
keep_alive true
working_dir HOMEBREW_PREFIX
log_path var/"log/openrun.log"
error_log_path var/"log/openrun.log"
skip_upload: auto
install: |-
bin.install "openrun"
post_install: |-
unless File.exist?("#{etc}/openrun.toml")
pid = spawn("#{opt_bin}/openrun password", out: "#{etc}/openrun.toml")
puts "********** Initializing \"admin\" user **********"
Process.wait(pid)
puts "************* Save this password ****************"
mkcert_path = `which mkcert`.chomp
unless mkcert_path.empty?
system("mkdir -p #{HOMEBREW_PREFIX}/var/openrun/config/certificates")
system("#{mkcert_path} -install")
system("#{mkcert_path} -cert-file #{HOMEBREW_PREFIX}/var/openrun/config/certificates/default.crt -key-file #{HOMEBREW_PREFIX}/var/openrun/config/certificates/default.key localhost 127.0.0.1 \"*.localhost\"")
puts "Created localhost TLS certificates"
end
end
winget:
- name: OpenRun
publisher: OpenRunDev
package_identifier: OpenRunDev.OpenRun
publisher_url: https://openrun.dev
publisher_support_url: https://github.com/openrundev/openrun/issues
short_description: Declarative web app deployment platform
description: Open source alternative to Google Cloud Run and AWS App Runner.
homepage: https://openrun.dev
license: Apache-2.0
license_url: https://github.com/openrundev/openrun/blob/main/LICENSE
release_notes_url: "https://github.com/openrundev/openrun/releases/tag/{{.Tag}}"
copyright: ClaceIO LLC.
ids: [zip-archives]
tags:
- cloud
- deployment
- webapps
- paas
skip_upload: auto
# Manifests are pushed to the openrundev fork of microsoft/winget-pkgs,
# then a PR is opened against the upstream repo. WINGET_GITHUB_TOKEN must
# be a PAT with push access to the fork.
repository:
owner: openrundev
name: winget-pkgs
branch: "openrun-{{.Version}}"
token: "{{ .Env.WINGET_GITHUB_TOKEN }}"
pull_request:
enabled: true
draft: false
base:
owner: microsoft
name: winget-pkgs
branch: master
# New images builder
dockers_v2:
- id: openrun_img
ids: [openrun]
dockerfile: deploy/Dockerfile
# Build both platforms and publish a single multi-arch manifest
platforms: [linux/amd64, linux/arm64]
images:
- ghcr.io/openrundev/openrun
tags:
- "{{ .Version }}" # e.g. 1.2.3
- "sha-{{ .ShortCommit }}"
- latest
labels:
"org.opencontainers.image.title": "openrun"
"org.opencontainers.image.description": "OpenRun: Declarative Web App Deployment"
"org.opencontainers.image.source": "{{ .GitURL }}"
"org.opencontainers.image.revision": "{{ .FullCommit }}"
"org.opencontainers.image.version": "{{ .Version }}"
"org.opencontainers.image.created": "{{ .Date }}"