Skip to content

Commit 126a689

Browse files
committed
feat: add GoReleaser release pipeline and migrate module path to tyeongkim/spec-graph
1 parent 0d13852 commit 126a689

62 files changed

Lines changed: 217 additions & 96 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/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
goreleaser:
13+
runs-on: ubuntu-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: stable
22+
23+
- uses: goreleaser/goreleaser-action@v7
24+
with:
25+
distribution: goreleaser
26+
version: "~> v2"
27+
args: release --clean
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.agents/
22
.sisyphus/
33
bin/
4+
dist/
45
.DS_Store

.goreleaser.yaml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
2+
version: 2
3+
4+
before:
5+
hooks:
6+
- go mod tidy
7+
- go test ./...
8+
9+
builds:
10+
- id: spec-graph
11+
main: ./cmd/spec-graph
12+
binary: spec-graph
13+
env:
14+
- CGO_ENABLED=0
15+
goos:
16+
- linux
17+
- darwin
18+
- windows
19+
goarch:
20+
- amd64
21+
- arm64
22+
flags:
23+
- -trimpath
24+
ldflags:
25+
- -s -w
26+
mod_timestamp: "{{ .CommitTimestamp }}"
27+
28+
archives:
29+
- name_template: >-
30+
{{- .ProjectName }}_
31+
{{- title .Os }}_
32+
{{- if eq .Arch "amd64" }}x86_64
33+
{{- else }}{{ .Arch }}{{ end }}
34+
format_overrides:
35+
- goos: windows
36+
formats: [zip]
37+
38+
checksum:
39+
name_template: checksums.txt
40+
41+
snapshot:
42+
version_template: "{{ incpatch .Version }}-next"
43+
44+
changelog:
45+
sort: asc
46+
use: github
47+
filters:
48+
exclude:
49+
- "^test:"
50+
- "^chore:"
51+
- "^docs:"
52+
- "^ci:"
53+
- "^build:"
54+
groups:
55+
- title: Features
56+
regexp: '^.*?feat(\(.+\))??!?:.+$'
57+
order: 100
58+
- title: Bug fixes
59+
regexp: '^.*?(fix|refactor)(\(.+\))??!?:.+$'
60+
order: 200
61+
- title: Others
62+
order: 9999
63+
64+
release:
65+
name_template: "v{{ .Version }}"
66+
footer: |
67+
**Full Changelog**: https://github.com/tyeongkim/spec-graph/compare/{{ .PreviousTag }}...{{ .Tag }}
68+
69+
homebrew_casks:
70+
- name: spec-graph
71+
repository:
72+
owner: tyeongkim
73+
name: homebrew-tap
74+
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
75+
url:
76+
template: "https://github.com/tyeongkim/spec-graph/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
77+
homepage: https://github.com/tyeongkim/spec-graph
78+
description: Typed specification graph CLI for managing requirements, decisions, and phases
79+
binaries:
80+
- spec-graph
81+
commit_msg_template: "Update {{ .ProjectName }} to {{ .Tag }}"

Makefile

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
BINARY := spec-graph
2-
MODULE := github.com/taeyeong/spec-graph
2+
MODULE := github.com/tyeongkim/spec-graph
33
BUILD_DIR := bin
44

55
GO := go
66
GOFLAGS :=
77
LDFLAGS :=
88

9-
.PHONY: all build test lint fmt vet tidy clean check run
9+
.PHONY: all build test lint fmt vet tidy clean check run release snapshot
1010

1111
all: check build
1212

@@ -44,6 +44,15 @@ tidy:
4444
## Combo
4545
check: fmt vet test
4646

47+
## Release
48+
release:
49+
@which goreleaser > /dev/null 2>&1 || { echo "goreleaser not found. Install: https://goreleaser.com/install/"; exit 1; }
50+
goreleaser release --clean
51+
52+
snapshot:
53+
@which goreleaser > /dev/null 2>&1 || { echo "goreleaser not found. Install: https://goreleaser.com/install/"; exit 1; }
54+
goreleaser release --snapshot --clean
55+
4756
## Clean
4857
clean:
49-
rm -rf $(BUILD_DIR) coverage.out
58+
rm -rf $(BUILD_DIR) coverage.out dist/

cmd/spec-graph/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package main
22

3-
import "github.com/taeyeong/spec-graph/internal/cli"
3+
import "github.com/tyeongkim/spec-graph/internal/cli"
44

55
func main() {
66
cli.Execute()

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/taeyeong/spec-graph
1+
module github.com/tyeongkim/spec-graph
22

33
go 1.25.0
44

internal/bootstrap/import.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
"fmt"
77
"os"
88

9-
"github.com/taeyeong/spec-graph/internal/model"
10-
"github.com/taeyeong/spec-graph/internal/store"
9+
"github.com/tyeongkim/spec-graph/internal/model"
10+
"github.com/tyeongkim/spec-graph/internal/store"
1111
)
1212

1313
// ReviewResult holds candidates formatted for review output (no DB interaction).

internal/bootstrap/import_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import (
77
"path/filepath"
88
"testing"
99

10-
"github.com/taeyeong/spec-graph/internal/db"
11-
"github.com/taeyeong/spec-graph/internal/model"
12-
"github.com/taeyeong/spec-graph/internal/store"
10+
"github.com/tyeongkim/spec-graph/internal/db"
11+
"github.com/tyeongkim/spec-graph/internal/model"
12+
"github.com/tyeongkim/spec-graph/internal/store"
1313
)
1414

1515
func setupImportTestDB(t *testing.T) *sql.DB {

internal/bootstrap/scan.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"regexp"
1111
"strings"
1212

13-
"github.com/taeyeong/spec-graph/internal/model"
13+
"github.com/tyeongkim/spec-graph/internal/model"
1414
)
1515

1616
// EntityCandidate represents a potential entity found in markdown.

internal/cli/bootstrap.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import (
44
"os"
55

66
"github.com/spf13/cobra"
7-
"github.com/taeyeong/spec-graph/internal/bootstrap"
8-
"github.com/taeyeong/spec-graph/internal/jsoncontract"
9-
"github.com/taeyeong/spec-graph/internal/model"
10-
"github.com/taeyeong/spec-graph/internal/store"
7+
"github.com/tyeongkim/spec-graph/internal/bootstrap"
8+
"github.com/tyeongkim/spec-graph/internal/jsoncontract"
9+
"github.com/tyeongkim/spec-graph/internal/model"
10+
"github.com/tyeongkim/spec-graph/internal/store"
1111
)
1212

1313
var bootstrapCmd = &cobra.Command{

0 commit comments

Comments
 (0)