Skip to content

feat(tui): add interactive TUI subcommand for sin-code with Bubbletea #21

feat(tui): add interactive TUI subcommand for sin-code with Bubbletea

feat(tui): add interactive TUI subcommand for sin-code with Bubbletea #21

name: sin-code Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.24.3'
- name: Test
run: go test -v ./cmd/sin-code/... 2>&1 | tee test-output.txt
- name: Vet
run: go vet ./cmd/sin-code/...
- name: govulncheck
# govulncheck is non-blocking because Go 1.24.3 stdlib has CVEs fixed only in Go 1.25.
# Re-enable blocking once Go 1.25 stable is available.
run: |
go install golang.org/x/vuln/cmd/govulncheck@latest
govulncheck ./cmd/sin-code/... > govulncheck-output.txt 2>&1 || true
- name: Upload govulncheck artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: govulncheck-output
path: govulncheck-output.txt
build:
name: Build
needs: test
strategy:
matrix:
include:
- goos: linux
goarch: amd64
ext: ''
- goos: linux
goarch: arm64
ext: ''
- goos: darwin
goarch: amd64
ext: ''
- goos: darwin
goarch: arm64
ext: ''
- goos: windows
goarch: amd64
ext: '.exe'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.24.3'
- name: Build
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: |
set -e
VERSION=${GITHUB_REF_NAME}
go version
go env GOOS GOARCH
go mod download
go build -v -ldflags "-s -w -X main.Version=${VERSION} -X github.com/OpenSIN-Code/SIN-Code-Bundle/cmd/sin-code/internal.ServerVersion=${VERSION}" -o sin-code${{ matrix.ext }} ./cmd/sin-code
- name: Archive
run: |
ARCH="${{ matrix.goos }}-${{ matrix.goarch }}"
mkdir -p dist
ls -la sin-code${{ matrix.ext }} || echo "Binary not found"
if [ "${{ matrix.goos }}" = "windows" ]; then
zip -j "dist/sin-code-${ARCH}.zip" "sin-code${{ matrix.ext }}"
else
tar -czf "dist/sin-code-${ARCH}.tar.gz" -C . "sin-code${{ matrix.ext }}"
fi
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: sin-code-${{ matrix.goos }}-${{ matrix.goarch }}
path: dist/*
release:
name: Release
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: artifacts
pattern: sin-code-*
merge-multiple: true
- name: Create checksums
run: |
cd artifacts
sha256sum * > checksums.txt
- name: Release
uses: softprops/action-gh-release@v2
with:
files: artifacts/*
body: |
Unified sin-code binary with 13 subcommands, MCP server mode, and cross-platform builds.
generate_release_notes: true