Skip to content

Commit 510033f

Browse files
committed
Minimal implementation
1 parent f1f7d54 commit 510033f

33 files changed

+4926
-1
lines changed

.github/FUNDING.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# These are supported funding model platforms
2+
3+
github: tkuchiki

.github/workflows/release.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: release
2+
on:
3+
push:
4+
tags:
5+
- "v[0-9]+.[0-9]+.[0-9]+"
6+
jobs:
7+
goreleaser:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v3
12+
with:
13+
fetch-depth: 1
14+
- name: Setup Go
15+
uses: actions/setup-go@v3
16+
with:
17+
go-version: 1.18
18+
- name: Run GoReleaser
19+
uses: goreleaser/goreleaser-action@v3
20+
with:
21+
version: latest
22+
args: release --rm-dist
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,9 @@
1313

1414
# Dependency directories (remove the comment below to include it)
1515
# vendor/
16+
/slp
17+
vendor
18+
dist
19+
cmd/slp/slp
20+
from.yaml
21+
to.yaml

.goreleaser.yaml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
before:
2+
hooks:
3+
- go mod tidy
4+
5+
builds:
6+
- env:
7+
- CGO_ENABLED=0
8+
main: ./cmd/slp/main.go
9+
binary: slp
10+
ldflags:
11+
- -s -w
12+
- -X main.version={{.Version}}
13+
flags:
14+
- -trimpath
15+
goos:
16+
- linux
17+
- darwin
18+
- windows
19+
- freebsd
20+
- netbsd
21+
- openbsd
22+
- solaris
23+
goarch:
24+
- amd64
25+
- arm64
26+
- mips64
27+
- mips64le
28+
ignore:
29+
- goos: darwin
30+
goarch: 386
31+
- goos: freebsd
32+
goarch: 386
33+
- goos: netbsd
34+
goarch: 386
35+
- goos: openbsd
36+
goarch: 386
37+
- goos: linux
38+
goarch: 386
39+
- goos: windows
40+
goarch: 386
41+
- goos: freebsd
42+
goarch: arm
43+
- goos: netbsd
44+
goarch: arm
45+
- goos: netbsd
46+
goarch: arm
47+
- goos: linux
48+
goarch: arm
49+
50+
archives:
51+
- id: tar-gz
52+
name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}'
53+
files:
54+
- none*
55+
- id: zip
56+
name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}'
57+
files:
58+
- none*
59+
format: zip

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
NAME := slp
2+
GO_LDFLAGS=-s -w
3+
GIT_COMMIT := $(shell git rev-parse --short HEAD)
4+
5+
.PHONY: build
6+
build:
7+
go build -trimpath -ldflags "$(GO_LDFLAGS) -X=main.version=$(GIT_COMMIT)" -o $(NAME) ./cmd/$(NAME)

0 commit comments

Comments
 (0)