-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
88 lines (80 loc) · 2.8 KB
/
Copy path.goreleaser.yaml
File metadata and controls
88 lines (80 loc) · 2.8 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
version: 2
# The released artifact is the default pure-Go static binary (copy/rootless
# backend) — the one you drop into a restricted pod. The optional btrfs backend
# needs cgo + libbtrfs and is built manually with `-tags btrfs`.
before:
hooks:
- go mod tidy
builds:
- id: agentenv
main: .
binary: agentenv
env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
- arm64
flags:
- -trimpath
ldflags:
- -s -w -X main.version={{ .Version }}
archives:
- formats: [tar.gz]
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
files:
- README.md
- LICENSE
- DESIGN.md
checksum:
name_template: "checksums.txt"
changelog:
use: github
# Multi-arch container images pushed to ghcr.io. Two per-arch images are built
# (each with a binary matching its target platform), then a single manifest
# list points at both — so `docker pull ghcr.io/css521/agentenv:vX.Y.Z`
# transparently picks amd64 or arm64.
dockers:
- image_templates:
- "ghcr.io/css521/agentenv:{{ .Version }}-amd64"
use: buildx
dockerfile: Dockerfile
goos: linux
goarch: amd64
build_flag_templates:
- "--platform=linux/amd64"
- "--label=org.opencontainers.image.source=https://github.com/css521/agentenv"
- "--label=org.opencontainers.image.version={{ .Version }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- "--label=org.opencontainers.image.licenses=MIT"
- image_templates:
- "ghcr.io/css521/agentenv:{{ .Version }}-arm64"
use: buildx
dockerfile: Dockerfile
goos: linux
goarch: arm64
build_flag_templates:
- "--platform=linux/arm64"
- "--label=org.opencontainers.image.source=https://github.com/css521/agentenv"
- "--label=org.opencontainers.image.version={{ .Version }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- "--label=org.opencontainers.image.licenses=MIT"
docker_manifests:
- name_template: "ghcr.io/css521/agentenv:{{ .Version }}"
image_templates:
- "ghcr.io/css521/agentenv:{{ .Version }}-amd64"
- "ghcr.io/css521/agentenv:{{ .Version }}-arm64"
- name_template: "ghcr.io/css521/agentenv:latest"
image_templates:
- "ghcr.io/css521/agentenv:{{ .Version }}-amd64"
- "ghcr.io/css521/agentenv:{{ .Version }}-arm64"
# Publish releases (not drafts) so downstreams can resolve the newest build via
# the GitHub "latest" API/redirect (api.github.com/repos/<slug>/releases/latest
# and /releases/latest/download/<asset>). Draft releases are excluded from both,
# which breaks "always fetch the latest agentenv artifact" consumers.
# prerelease: auto marks -rc/-beta tags as pre-releases so they don't become
# "latest" for stable consumers.
release:
draft: false
prerelease: auto