forked from railwayapp/railpack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.goreleaser.yml
More file actions
81 lines (73 loc) · 2.72 KB
/
Copy path.goreleaser.yml
File metadata and controls
81 lines (73 loc) · 2.72 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
# run automatically when a tag is created by the release.yml workflow
version: 2
# TODO replace with a `go mod tidy -check` when go is upgraded
before:
hooks:
- go mod tidy
builds:
- id: cli
main: ./cmd/cli
binary: railpack
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
ldflags:
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.CommitDate}}
archives:
- formats: [tar.gz]
name_template: >-
{{ .ProjectName }}-v{{ .Version }}-
{{- if and (eq .Arch "amd64") (eq .Os "darwin") }}x86_64-apple-darwin
{{- else if and (eq .Arch "arm64") (eq .Os "darwin") }}arm64-apple-darwin
{{- else if and (eq .Arch "amd64") (eq .Os "linux") }}x86_64-unknown-linux-musl
{{- else if and (eq .Arch "arm64") (eq .Os "linux") }}arm64-unknown-linux-musl
{{- else if and (eq .Arch "amd64") (eq .Os "windows") }}x86_64-pc-windows-msvc
{{- else if and (eq .Arch "arm64") (eq .Os "windows") }}arm64-pc-windows-msvc
{{- else }}{{ .Arch }}-{{ .Os }}{{ end }}
format_overrides:
- goos: windows
formats: [zip]
# build a multi-arch railpack frontend image to be used by buildkit to convert a repo (and any railpack.json) into docker llb
# the railpack build and runtime images are created separately. This image bundles the freshly compiled railpack binary
# which is why we build the images here instead of GHA.
dockers:
- image_templates:
- "{{ .Env.PRODUCTION_FRONTEND_IMAGE_NAME }}:{{ .Tag }}-amd64"
- "{{ .Env.PRODUCTION_FRONTEND_IMAGE_NAME }}:latest-amd64"
use: buildx
build_flag_templates:
- "--pull"
- "--platform=linux/amd64"
dockerfile: images/alpine/frontend/goreleaser.Dockerfile
- image_templates:
- "{{ .Env.PRODUCTION_FRONTEND_IMAGE_NAME }}:{{ .Tag }}-arm64"
- "{{ .Env.PRODUCTION_FRONTEND_IMAGE_NAME }}:latest-arm64"
use: buildx
build_flag_templates:
- "--pull"
- "--platform=linux/arm64"
goarch: arm64
dockerfile: images/alpine/frontend/goreleaser.Dockerfile
docker_manifests:
- name_template: "{{ .Env.PRODUCTION_FRONTEND_IMAGE_NAME }}:{{ .Tag }}"
image_templates:
- "{{ .Env.PRODUCTION_FRONTEND_IMAGE_NAME }}:{{ .Tag }}-amd64"
- "{{ .Env.PRODUCTION_FRONTEND_IMAGE_NAME }}:{{ .Tag }}-arm64"
- name_template: "{{ .Env.PRODUCTION_FRONTEND_IMAGE_NAME }}:latest"
image_templates:
- "{{ .Env.PRODUCTION_FRONTEND_IMAGE_NAME }}:latest-amd64"
- "{{ .Env.PRODUCTION_FRONTEND_IMAGE_NAME }}:latest-arm64"
changelog:
use: github-native
checksum:
name_template: 'checksums.txt'
release:
prerelease: auto
name_template: "{{.ProjectName}} v{{.Version}}"
include_meta: true