Skip to content

Commit

Permalink
Minimal implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
tkuchiki committed Jul 26, 2022
1 parent f1f7d54 commit 510033f
Show file tree
Hide file tree
Showing 33 changed files with 4,926 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

github: tkuchiki
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.18
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@

# Dependency directories (remove the comment below to include it)
# vendor/
/slp
vendor
dist
cmd/slp/slp
from.yaml
to.yaml
59 changes: 59 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
before:
hooks:
- go mod tidy

builds:
- env:
- CGO_ENABLED=0
main: ./cmd/slp/main.go
binary: slp
ldflags:
- -s -w
- -X main.version={{.Version}}
flags:
- -trimpath
goos:
- linux
- darwin
- windows
- freebsd
- netbsd
- openbsd
- solaris
goarch:
- amd64
- arm64
- mips64
- mips64le
ignore:
- goos: darwin
goarch: 386
- goos: freebsd
goarch: 386
- goos: netbsd
goarch: 386
- goos: openbsd
goarch: 386
- goos: linux
goarch: 386
- goos: windows
goarch: 386
- goos: freebsd
goarch: arm
- goos: netbsd
goarch: arm
- goos: netbsd
goarch: arm
- goos: linux
goarch: arm

archives:
- id: tar-gz
name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}'
files:
- none*
- id: zip
name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}'
files:
- none*
format: zip
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
NAME := slp
GO_LDFLAGS=-s -w
GIT_COMMIT := $(shell git rev-parse --short HEAD)

.PHONY: build
build:
go build -trimpath -ldflags "$(GO_LDFLAGS) -X=main.version=$(GIT_COMMIT)" -o $(NAME) ./cmd/$(NAME)
Loading

0 comments on commit 510033f

Please sign in to comment.