-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yaml
93 lines (86 loc) · 2.72 KB
/
.goreleaser.yaml
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
---
project_name: pull-requester
release:
github:
owner: n3tuk
name: action-pull-requester
name_template: "{{ .Tag }}"
changelog:
skip: true
snapshot:
name_template: '{{ incpatch .Version }}~g{{ .ShortCommit }}{{ if .IsGitDirty }}-d{{ .Now.Format "02-t150405" }}{{ end }}'
checksum:
name_template: "{{ .ProjectName }}-{{ .Version }}-checksums.txt"
builds:
- id: pull-requester
main: main.go
binary: pull-requester
env:
- CGO_ENABLED=0
ldflags: >-
-s -w
-X 'main.branch={{ .Branch }}'
-X 'main.commit={{ .FullCommit }}'
-X 'main.version={{ .Version }}'
-X 'main.date={{ .Date }}'
goos:
- linux
goarch:
- amd64
- arm64
targets:
- linux_amd64
- linux_arm64
archives:
- id: default
name_template: >-
{{ .ProjectName }}-
{{- .Version }}-
{{- tolower .Os }}-
{{- tolower .Arch }}
format: tar.gz
files:
- LICENSE
# Create images for both amd64 and arm64 to give it the widest possible support
dockers:
- id: pull-requester-amd64
goarch: amd64
image_templates:
- ghcr.io/n3tuk/pull-requester:{{ .Version }}-amd64
dockerfile: Dockerfile
use: docker
build_flag_templates:
- --platform=linux/amd64
- --label=org.opencontainers.image.version={{ .Version }}
- --label=org.opencontainers.image.created={{ .Date }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- id: pull-requester-arm64
goarch: arm64
image_templates:
- ghcr.io/n3tuk/pull-requester:{{ .Version }}-arm64
dockerfile: Dockerfile
use: docker
build_flag_templates:
- --platform=linux/arm64
- --label=org.opencontainers.image.version={{ .Version }}
- --label=org.opencontainers.image.created={{ .Date }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
# Build a set of manifests based on all the ways the GitHub Action could be
# called, including as the main branch, both short and long commit IDs, and each of
# Major, Major/Minor, and Major/Minor/Patch versions being tagged
docker_manifests:
- name_template: ghcr.io/n3tuk/pull-requester:latest
use: docker
image_templates:
- ghcr.io/n3tuk/pull-requester:{{ .Version }}-amd64
- ghcr.io/n3tuk/pull-requester:{{ .Version }}-arm64
- name_template: ghcr.io/n3tuk/pull-requester:{{ .Version }}
use: docker
image_templates:
- ghcr.io/n3tuk/pull-requester:{{ .Version }}-amd64
- ghcr.io/n3tuk/pull-requester:{{ .Version }}-arm64
- name_template: ghcr.io/n3tuk/pull-requester:{{ .ShortCommit }}
use: docker
image_templates:
- ghcr.io/n3tuk/pull-requester:{{ .Version }}-amd64
- ghcr.io/n3tuk/pull-requester:{{ .Version }}-arm64