Skip to content

Commit 0375a6d

Browse files
committed
[lbry] ci: support GoReleaser
1 parent 2cfa235 commit 0375a6d

File tree

2 files changed

+75
-0
lines changed

2 files changed

+75
-0
lines changed

.goreleaser.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# This is an example .goreleaser.yml file with some sensible defaults.
2+
# Make sure to check the documentation at https://goreleaser.com
3+
before:
4+
hooks:
5+
# You may remove this if you don't use go modules.
6+
- go mod tidy
7+
# you may remove this if you don't need go generate
8+
- go generate ./...
9+
builds:
10+
-
11+
main: .
12+
id: "lbcd"
13+
binary: "lbcd"
14+
env:
15+
- CGO_ENABLED=0
16+
flags:
17+
- -trimpath
18+
ldflags:
19+
- -s -w
20+
- -X github.com/lbryio/lbcd/version.appTag={{ .Tag }}
21+
targets:
22+
- linux_amd64
23+
- linux_arm64
24+
- darwin_amd64
25+
- darwin_arm64
26+
- windows_amd64
27+
mod_timestamp: '{{ .CommitTimestamp }}'
28+
-
29+
main: ./cmd/lbcctl
30+
id: "lbcctl"
31+
binary: "lbcctl"
32+
flags:
33+
- -trimpath
34+
ldflags:
35+
- -s -w
36+
- -X github.com/lbryio/lbcd/version.appTag={{ .Tag }}
37+
env:
38+
- CGO_ENABLED=0
39+
targets:
40+
- linux_amd64
41+
- linux_arm64
42+
- darwin_amd64
43+
- darwin_arm64
44+
- windows_amd64
45+
mod_timestamp: '{{ .CommitTimestamp }}'
46+
checksum:
47+
name_template: 'checksums.txt'
48+
snapshot:
49+
name_template: "{{ .Version }}+{{ .Commit }}"
50+
changelog:
51+
sort: asc
52+
filters:
53+
exclude:
54+
- '^docs:'
55+
- '^test:'
56+
57+
dockers:
58+
- use: buildx
59+
dockerfile: Dockerfile.goreleaser
60+
image_templates:
61+
- "docker.io/lbry/lbcd:{{ .Tag }}"
62+
- "docker.io/lbry/lbcd:latest"
63+
64+
release:
65+
draft: true
66+
prerelease: auto

Dockerfile.goreleaser

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM debian:bullseye-20220418-slim
2+
3+
COPY lbcd lbcctl /bin/
4+
5+
VOLUME ["/root/.lbcd"]
6+
7+
EXPOSE 9245 9246
8+
9+
ENTRYPOINT ["lbcd"]

0 commit comments

Comments
 (0)