Add GoReleaser configuration and update Go version to 1.25
Signed-off-by: Snider <snider@lt.hn>
This commit is contained in:
parent
32f1d0ab5d
commit
d25bd5c5ca
6 changed files with 148 additions and 9 deletions
36
.github/workflows/release.yml
vendored
Normal file
36
.github/workflows/release.yml
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
name: release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*.*.*'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
goreleaser:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: '1.25'
|
||||||
|
check-latest: true
|
||||||
|
- name: Set up Node (for GUI builds if needed)
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '22'
|
||||||
|
- name: Install Wails (optional)
|
||||||
|
run: |
|
||||||
|
go install github.com/wailsapp/wails/v3/cmd/wails3@latest || true
|
||||||
|
- name: Run GoReleaser
|
||||||
|
uses: goreleaser/goreleaser-action@v6
|
||||||
|
with:
|
||||||
|
distribution: goreleaser
|
||||||
|
version: latest
|
||||||
|
args: release --clean
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
85
.goreleaser.yaml
Normal file
85
.goreleaser.yaml
Normal file
|
|
@ -0,0 +1,85 @@
|
||||||
|
# Minimal Goreleaser configuration for Snider/Core
|
||||||
|
# No functional changes to the codebase, just release automation.
|
||||||
|
|
||||||
|
version: 2
|
||||||
|
|
||||||
|
before:
|
||||||
|
hooks:
|
||||||
|
- go mod tidy
|
||||||
|
|
||||||
|
builds:
|
||||||
|
- id: core-cli
|
||||||
|
main: ./cmd/core
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=0
|
||||||
|
goos:
|
||||||
|
- linux
|
||||||
|
- darwin
|
||||||
|
- windows
|
||||||
|
goarch:
|
||||||
|
- amd64
|
||||||
|
- arm64
|
||||||
|
flags:
|
||||||
|
- -trimpath
|
||||||
|
ldflags:
|
||||||
|
- -s -w
|
||||||
|
mod_timestamp: '{{ .CommitDate }}'
|
||||||
|
binary: core
|
||||||
|
|
||||||
|
- id: core-gui
|
||||||
|
# Wails GUI apps often require CGO and platform specifics; we keep a minimal build here.
|
||||||
|
# If GUI builds need special handling, they can be adjusted later.
|
||||||
|
main: ./cmd/core-gui
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=1
|
||||||
|
goos:
|
||||||
|
- darwin
|
||||||
|
- windows
|
||||||
|
- linux
|
||||||
|
goarch:
|
||||||
|
- amd64
|
||||||
|
- arm64
|
||||||
|
flags:
|
||||||
|
- -trimpath
|
||||||
|
ldflags:
|
||||||
|
- -s -w
|
||||||
|
mod_timestamp: '{{ .CommitDate }}'
|
||||||
|
binary: core-gui
|
||||||
|
|
||||||
|
archives:
|
||||||
|
- id: default
|
||||||
|
builds:
|
||||||
|
- core-cli
|
||||||
|
- core-gui
|
||||||
|
name_template: >-
|
||||||
|
{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}
|
||||||
|
formats:
|
||||||
|
- tar.gz
|
||||||
|
format_overrides:
|
||||||
|
- goos: windows
|
||||||
|
formats: [zip]
|
||||||
|
files:
|
||||||
|
- LICENSE.txt
|
||||||
|
- README.md
|
||||||
|
|
||||||
|
checksum:
|
||||||
|
name_template: 'checksums.txt'
|
||||||
|
|
||||||
|
dockers: []
|
||||||
|
|
||||||
|
nfpms: []
|
||||||
|
|
||||||
|
changelog:
|
||||||
|
use: github
|
||||||
|
sort: asc
|
||||||
|
filters:
|
||||||
|
exclude:
|
||||||
|
- '^docs:'
|
||||||
|
- '^test:'
|
||||||
|
|
||||||
|
release:
|
||||||
|
github:
|
||||||
|
owner: Snider
|
||||||
|
name: Core
|
||||||
|
draft: false
|
||||||
|
prerelease: auto
|
||||||
28
README.md
28
README.md
|
|
@ -62,7 +62,7 @@ The project is organized into the following main directories:
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
- [Go](https://go.dev/)
|
- Go 1.25+ (this repo targets Go 1.25 and uses workspaces)
|
||||||
- [Node.js](https://nodejs.org/)
|
- [Node.js](https://nodejs.org/)
|
||||||
- [Wails](https://wails.io/)
|
- [Wails](https://wails.io/)
|
||||||
- [Task](https://taskfile.dev/)
|
- [Task](https://taskfile.dev/)
|
||||||
|
|
@ -127,11 +127,25 @@ These tasks are run from the root directory and operate on the CLI application.
|
||||||
- `task cli:test-gen`: Generates tests for the public API.
|
- `task cli:test-gen`: Generates tests for the public API.
|
||||||
|
|
||||||
## Docs (MkDocs)
|
## Docs (MkDocs)
|
||||||
The help site and in‑app docs are built with MkDocs Material and live under `pkg/v1/core/docs`.
|
The documentation site is powered by MkDocs Material and lives under `docs/` with configuration in `mkdocs.yml`.
|
||||||
|
|
||||||
- Live preview: from `pkg/v1/core/docs` run
|
- Install docs tooling:
|
||||||
- `pip install -r requirements.txt`
|
- `pip install -r docs/requirements.txt`
|
||||||
- `mkdocs serve -o -c` (or `task dev` if you use Task)
|
- Live preview from repository root:
|
||||||
- Build static site: `mkdocs build --clean -d public` (or `task build`)
|
- `mkdocs serve -o -c`
|
||||||
|
- Build static site:
|
||||||
|
- `mkdocs build --clean`
|
||||||
|
|
||||||
The demo app embeds the built docs from `public/` and can open specific sections in new windows using stable, short headings.
|
## Releasing (GoReleaser)
|
||||||
|
This repo includes a minimal GoReleaser config (`.goreleaser.yaml`). Tagged pushes like `v1.2.3` will build and publish archives via GitHub Actions (see `.github/workflows/release.yml`).
|
||||||
|
|
||||||
|
- Local dry run: `goreleaser release --snapshot --clean`
|
||||||
|
- Real release: create and push a version tag `vX.Y.Z`.
|
||||||
|
|
||||||
|
## Go Workspaces
|
||||||
|
This repository uses Go workspaces (`go.work`) targeting Go 1.25.
|
||||||
|
|
||||||
|
- Add/remove modules with `go work use`.
|
||||||
|
- Typical workflow:
|
||||||
|
- `go work sync`
|
||||||
|
- `go mod tidy` in modules as needed
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
module github.com/Snider/Core/cmd/core
|
module github.com/Snider/Core/cmd/core
|
||||||
|
|
||||||
go 1.23.0
|
go 1.25
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/charmbracelet/lipgloss v1.1.0
|
github.com/charmbracelet/lipgloss v1.1.0
|
||||||
|
|
|
||||||
4
docs/requirements.txt
Normal file
4
docs/requirements.txt
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
mkdocs>=1.6.0
|
||||||
|
mkdocs-material>=9.5.0
|
||||||
|
mkdocs-material-extensions>=1.3
|
||||||
|
pymdown-extensions>=10.8
|
||||||
2
go.work
2
go.work
|
|
@ -1,4 +1,4 @@
|
||||||
go 1.25.3
|
go 1.25
|
||||||
|
|
||||||
use (
|
use (
|
||||||
.
|
.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue