-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
159 lines (149 loc) · 4.44 KB
/
.goreleaser.yaml
File metadata and controls
159 lines (149 loc) · 4.44 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
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
- go test -race ./...
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
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}}"
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
# 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 }}"