Skip to content

feat(temporal): content_times TIMESTAMPTZ + daily dimension #15

feat(temporal): content_times TIMESTAMPTZ + daily dimension

feat(temporal): content_times TIMESTAMPTZ + daily dimension #15

Workflow file for this run

# 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.25"
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: 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: Create GitHub Release
uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2.6.1
with:
tag_name: ${{ steps.version.outputs.tag }}
name: ctx ${{ steps.version.outputs.tag }}
generate_release_notes: true
files: dist/*
body: |
## Installation
**With Go:**
```bash
go install github.com/GottZ/ctx/cmd/ctx@${{ steps.version.outputs.tag }}
```
**Binary download:**
Download the binary for your platform, make it executable, move to PATH:
```bash
chmod +x ctx-*
sudo mv ctx-* /usr/local/bin/ctx
```
**Claude Code statusline setup:**
```bash
ctx statusline --help
```