Skip to content

Commit

Permalink
Add goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
creativecreature committed Jun 28, 2024
1 parent 170d289 commit 5462887
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*.so
*.dylib
bin
dist

# environment variables
.envrc
Expand Down
38 changes: 30 additions & 8 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
before:
hooks:
- go mod tidy

builds:
- main: ./cmd/server
- id: server
main: ./cmd/server
binary: server
env:
- CGO_ENABLED=0
Expand All @@ -13,35 +15,55 @@ builds:
- arm64
- amd64
- 386
output:
dir: dist/{{ .Os }}/{{ .Arch }}

- main: ./cmd/client
- id: client
main: ./cmd/client
binary: client
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- arm64
- amd64
- 386
output:
dir: dist/{{ .Os }}/{{ .Arch }}

archives:
- format: tar.gz
- id: server_archive
builds:
- server
format: tar.gz
name_template: >-
server_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
files:
- server

- id: client_archive
builds:
- client
format: tar.gz
name_template: >-
{{ .ProjectName }}_
client_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
files:
- client

checksum:
name_template: 'checksums.txt'

snapshot:
name_template: "{{ incpatch .Version }}-next"

changelog:
sort: asc
filters:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ first.
# Running this project

## 1. Download the binaries
Download and unpack the server and client binaries from the [releases](https://github.com/creativecreature/sturdyc/releases).
Download and unpack the server **and** client binaries from the [releases](https://github.com/creativecreature/sturdyc/releases).
Next, you'll want to make sure that they are reachable from your `$PATH`.

## 2. Create a configuration file
Expand Down

0 comments on commit 5462887

Please sign in to comment.