9cef01d5b4
- build.yml: only triggers on platform code changes (models, routers, templates, modules, services). Ignores cmd/tstudio, web/, bot, proxy. - build-tstudio.yml: fixed version detection (uses git describe, not removed TSTUDIO_VERSION). Only triggers on cmd/tstudio/** changes. - deploy-docs.yml: NEW — deploys docs/pages to S3 when templates or SETUP.md change. Independent from platform build. - deploy-arikigame.yml: unchanged, already path-filtered. Each pipeline runs independently. No more queueing CLI builds behind full platform rebuilds. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
52 lines
1.8 KiB
YAML
52 lines
1.8 KiB
YAML
name: Build tstudio CLI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'cmd/tstudio/**'
|
|
- '.gitea/workflows/build-tstudio.yml'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: host
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.26.2'
|
|
|
|
- name: Detect version
|
|
id: version
|
|
run: |
|
|
VERSION=$(git describe --tags --always | sed 's/-/+/' | sed 's/^v//')
|
|
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
|
echo "tstudio version: $VERSION"
|
|
|
|
- name: Build all platforms
|
|
run: |
|
|
VERSION="${{ steps.version.outputs.version }}"
|
|
LDFLAGS="-s -w -X main.Version=${VERSION}"
|
|
mkdir -p dist/tstudio
|
|
|
|
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "$LDFLAGS" -o dist/tstudio/tstudio-windows-amd64.exe ./cmd/tstudio/
|
|
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -ldflags "$LDFLAGS" -o dist/tstudio/tstudio-darwin-arm64 ./cmd/tstudio/
|
|
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "$LDFLAGS" -o dist/tstudio/tstudio-darwin-amd64 ./cmd/tstudio/
|
|
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "$LDFLAGS" -o dist/tstudio/tstudio-linux-amd64 ./cmd/tstudio/
|
|
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags "$LDFLAGS" -o dist/tstudio/tstudio-linux-arm64 ./cmd/tstudio/
|
|
|
|
ls -lh dist/tstudio/
|
|
|
|
- name: Upload to S3
|
|
run: |
|
|
VERSION="${{ steps.version.outputs.version }}"
|
|
S3_BASE="s3://tinqs-cli-releases/tstudio"
|
|
|
|
for BIN in dist/tstudio/tstudio-*; do
|
|
NAME=$(basename "$BIN")
|
|
aws s3 cp "$BIN" "$S3_BASE/latest/$NAME" --region eu-west-1
|
|
aws s3 cp "$BIN" "$S3_BASE/v$VERSION/$NAME" --region eu-west-1
|
|
done
|
|
|
|
echo "OK tstudio $VERSION → S3"
|