feat(web): status dashboard — GET /api/status + /api/llmlog, process-… #94
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ctx Release Pipeline — Multi-platform binaries | |
| # Triggers on version tags (v*). Builds for 5 platforms, creates GitHub Release. | |
| name: Release | |
| on: | |
| push: | |
| tags: ["v*"] | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: "Version tag (e.g. v0.14.0)" | |
| required: true | |
| permissions: {} | |
| concurrency: | |
| group: release-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| GO_VERSION: "1.26" | |
| jobs: | |
| release: | |
| name: Build & Release | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| permissions: | |
| contents: read | |
| strategy: | |
| matrix: | |
| include: | |
| - goos: linux | |
| goarch: amd64 | |
| - goos: linux | |
| goarch: arm64 | |
| - goos: darwin | |
| goarch: amd64 | |
| - goos: darwin | |
| goarch: arm64 | |
| - goos: windows | |
| goarch: amd64 | |
| ext: .exe | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup Go ${{ env.GO_VERSION }} | |
| uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| cache: true | |
| cache-dependency-path: go/go.sum | |
| - name: Determine version | |
| id: version | |
| run: | | |
| TAG="${{ github.event.inputs.tag || github.ref_name }}" | |
| echo "tag=${TAG}" >> "$GITHUB_OUTPUT" | |
| echo "Building version: ${TAG}" | |
| - name: Build ${{ matrix.goos }}/${{ matrix.goarch }} | |
| working-directory: go | |
| env: | |
| CGO_ENABLED: "0" | |
| GOOS: ${{ matrix.goos }} | |
| GOARCH: ${{ matrix.goarch }} | |
| run: | | |
| BINARY="../ctx-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.ext }}" | |
| go build \ | |
| -trimpath \ | |
| -ldflags="-s -w \ | |
| -X main.version=${{ steps.version.outputs.tag }} \ | |
| -X main.commit=${{ github.sha }} \ | |
| -X main.date=$(date -u +%Y-%m-%dT%H:%M:%SZ)" \ | |
| -o "${BINARY}" \ | |
| ./cmd/ctx/ | |
| echo "Built: ${BINARY} ($(du -h "${BINARY}" | cut -f1))" | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| with: | |
| name: ctx-${{ matrix.goos }}-${{ matrix.goarch }} | |
| path: ctx-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.ext }} | |
| retention-days: 30 | |
| publish: | |
| name: Publish Release | |
| runs-on: ubuntu-latest | |
| needs: [release] | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout (with tags) | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| path: dist/ | |
| merge-multiple: true | |
| - name: Determine version | |
| id: version | |
| run: | | |
| TAG="${{ github.event.inputs.tag || github.ref_name }}" | |
| echo "tag=${TAG}" >> "$GITHUB_OUTPUT" | |
| - name: Extract tag annotation as release body | |
| id: notes | |
| run: | | |
| TAG="${{ steps.version.outputs.tag }}" | |
| # Extract tag annotation (strips signature block, keeps message body) | |
| TAG_MSG=$(git tag -l --format='%(contents:subject)%0a%0a%(contents:body)' "$TAG") | |
| if [ -z "$TAG_MSG" ] || [ "$TAG_MSG" = $'\n\n' ]; then | |
| TAG_MSG="Release $TAG" | |
| fi | |
| { | |
| echo "body<<RELEASE_NOTES_EOF" | |
| echo "$TAG_MSG" | |
| echo "" | |
| echo "## Installation" | |
| echo "" | |
| echo "**With Go:**" | |
| echo '```bash' | |
| echo "go install github.com/GottZ/ctx/cmd/ctx@${TAG}" | |
| echo '```' | |
| echo "" | |
| echo "**Binary download:**" | |
| echo "Download the binary for your platform, make it executable, move to PATH:" | |
| echo '```bash' | |
| echo "chmod +x ctx-*" | |
| echo "sudo mv ctx-* /usr/local/bin/ctx" | |
| echo '```' | |
| echo "RELEASE_NOTES_EOF" | |
| } >> "$GITHUB_OUTPUT" | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0 | |
| with: | |
| tag_name: ${{ steps.version.outputs.tag }} | |
| name: ctx ${{ steps.version.outputs.tag }} | |
| generate_release_notes: false | |
| files: dist/* | |
| body: ${{ steps.notes.outputs.body }} |