Skip to content

Commit 64a0be3

Browse files
committed
feat: initial release
0 parents  commit 64a0be3

50 files changed

Lines changed: 6176 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
test:
14+
runs-on: macos-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: actions/setup-go@v5
19+
with:
20+
go-version-file: go.mod
21+
22+
- name: Build
23+
run: go build ./cmd/lanchr
24+
25+
- name: Test
26+
run: go test -race -cover ./...
27+
28+
- name: Vet
29+
run: go vet ./...

.github/workflows/release.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
runs-on: macos-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- uses: actions/setup-go@v5
20+
with:
21+
go-version-file: go.mod
22+
23+
- name: Run tests
24+
run: go test -race ./...
25+
26+
- uses: goreleaser/goreleaser-action@v6
27+
with:
28+
version: "~> v2"
29+
args: release --clean
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Binary (root only, not cmd/lanchr/)
2+
/lanchr
3+
bin/
4+
5+
# GoReleaser
6+
dist/
7+
8+
# macOS
9+
.DS_Store

.goreleaser.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
version: 2
2+
3+
builds:
4+
- main: ./cmd/lanchr
5+
binary: lanchr
6+
goos:
7+
- darwin
8+
goarch:
9+
- amd64
10+
- arm64
11+
ldflags:
12+
- -s -w
13+
- -X github.com/zhengda-lu/lanchr/internal/cli.version={{.Version}}
14+
15+
archives:
16+
- formats:
17+
- tar.gz
18+
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
19+
20+
checksum:
21+
name_template: "checksums.txt"
22+
23+
changelog:
24+
sort: asc
25+
filters:
26+
exclude:
27+
- "^docs:"
28+
- "^test:"
29+
- "^chore:"
30+
31+
brews:
32+
- repository:
33+
owner: lu-zhengda
34+
name: homebrew-tap
35+
token: "{{ .Env.HOMEBREW_TAP_TOKEN }}"
36+
directory: Formula
37+
homepage: "https://github.com/zhengda-lu/lanchr"
38+
description: "A macOS launch agent/daemon manager"
39+
license: "MIT"
40+
install: |
41+
bin.install "lanchr"
42+
test: |
43+
system "#{bin}/lanchr", "--version"

0 commit comments

Comments
 (0)