From 46df64e565049135e322654d31b83607e5e78b2c Mon Sep 17 00:00:00 2001 From: Rohit Ravindra Date: Sat, 27 Jun 2026 10:14:57 +0530 Subject: [PATCH 1/3] feat: config uncommit --- .devlocal/config.yaml | 6 ++++++ .gitignore | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .devlocal/config.yaml diff --git a/.devlocal/config.yaml b/.devlocal/config.yaml new file mode 100644 index 0000000..be1b161 --- /dev/null +++ b/.devlocal/config.yaml @@ -0,0 +1,6 @@ +version: 1 +overlook: + - blah.mod + - go.mod + - internal\git\worktrees.go +patches: [] diff --git a/.gitignore b/.gitignore index b6e2387..a2b41d5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ PLAN.md devlocal.exe -.devlocal \ No newline at end of file +.devlocal/backups/ +.devlocal/state.json \ No newline at end of file From 574b5ed86f5622e1177f7fedf46c3ff6c46bbe16 Mon Sep 17 00:00:00 2001 From: Rohit Ravindra Date: Sat, 27 Jun 2026 12:02:00 +0530 Subject: [PATCH 2/3] build: release pipeline --- .github/workflows/release.yml | 34 ++++++++++++++++++++++++++++ .gitignore | 3 +-- .goreleaser.yml | 42 +++++++++++++++++++++++++++++++++++ cmd/version.go | 2 +- internal/config/constants.go | 2 ++ 5 files changed, 80 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/release.yml create mode 100644 .goreleaser.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..6da55ae --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +name: Release + +on: + push: + tags: + - "v*" + +permissions: + contents: write + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + persist-credentials: false + + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version-file: go.mod + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v6 + with: + distribution: goreleaser + version: "~> v2" + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index a2b41d5..b6e2387 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ PLAN.md devlocal.exe -.devlocal/backups/ -.devlocal/state.json \ No newline at end of file +.devlocal \ No newline at end of file diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..2a99759 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,42 @@ +version: 2 + +project_name: devlocal + +before: + hooks: + - go mod tidy + +builds: + - id: devlocal + binary: devlocal + main: . + env: + - CGO_ENABLED=0 + + goos: + - windows + - linux + - darwin + + goarch: + - amd64 + - arm64 + + ldflags: + - >- + -s -w + -X github.com/RohitRavindra-dev/devlocal/internal/config.Version={{ .Version }} + -X github.com/RohitRavindra-dev/devlocal/internal/config.Commit={{ .Commit }} + -X github.com/RohitRavindra-dev/devlocal/internal/config.Date={{ .Date }} + +archives: + - formats: [zip] + name_template: >- + {{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }} + +checksum: + name_template: checksums.txt + +release: + draft: false + prerelease: auto \ No newline at end of file diff --git a/cmd/version.go b/cmd/version.go index b758501..ca9603c 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -11,7 +11,7 @@ var versionCmd = &cobra.Command{ Use: "version", Short: "Print version information", Run: func(cmd *cobra.Command, args []string) { - fmt.Println("devlocal", config.Version) + fmt.Println("[devlocal]", config.Version, config.Commit) }, } diff --git a/internal/config/constants.go b/internal/config/constants.go index 05c74c3..dc9e5b5 100644 --- a/internal/config/constants.go +++ b/internal/config/constants.go @@ -9,4 +9,6 @@ const ( var ( Version = "dev" + Commit = "none" + Date = "unknown" ) From 55ef9be2f9c6e465df2bae1b68fd8bd3961a2da6 Mon Sep 17 00:00:00 2001 From: Rohit Ravindra Date: Sat, 27 Jun 2026 12:03:46 +0530 Subject: [PATCH 3/3] chore: pr cleanup --- .devlocal/config.yaml | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 .devlocal/config.yaml diff --git a/.devlocal/config.yaml b/.devlocal/config.yaml deleted file mode 100644 index be1b161..0000000 --- a/.devlocal/config.yaml +++ /dev/null @@ -1,6 +0,0 @@ -version: 1 -overlook: - - blah.mod - - go.mod - - internal\git\worktrees.go -patches: []