Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release

on:
push:
tags:
- 'v*'

permissions:
contents: write

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'

- name: Run tests
run: go test ./...

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
version: '~> v2'
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
110 changes: 110 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
version: 2

project_name: cu

before:
hooks:
- go mod tidy

builds:
- id: cu
main: ./cmd/cu
binary: cu
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
ignore:
- goos: windows
goarch: arm64
ldflags:
- -s -w
- -X github.com/tim/cu/internal/version.Version={{.Version}}
- -X github.com/tim/cu/internal/version.Commit={{.Commit}}
- -X github.com/tim/cu/internal/version.Date={{.Date}}
- -X github.com/tim/cu/internal/version.BuiltBy=goreleaser

archives:
- id: cu-archive
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else }}{{ .Arch }}{{ end }}
ids:
- cu
formats:
- tar.gz
format_overrides:
- goos: windows
formats:
- zip
files:
- README.md
- LICENSE*

checksum:
name_template: 'checksums.txt'
algorithm: sha256

snapshot:
version_template: "{{ incpatch .Version }}-dev"

changelog:
sort: asc
use: github
filters:
exclude:
- '^docs:'
- '^test:'
- '^chore:'
- '^ci:'
groups:
- title: 'New Features'
regexp: '^feat'
- title: 'Bug Fixes'
regexp: '^fix'
- title: 'Performance'
regexp: '^perf'

homebrew_casks:
- name: cu
ids:
- cu-archive
repository:
owner: timimsms
name: homebrew-cu
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
directory: Casks
homepage: "https://github.com/timimsms/cu"
description: "A CLI for ClickUp — like gh is for GitHub"

release:
github:
owner: timimsms
name: cu
draft: false
prerelease: auto
name_template: "cu v{{.Version}}"
header: |
## ClickUp CLI v{{.Version}}
footer: |
## Installation

### Homebrew (macOS/Linux)
```bash
brew install timimsms/cu/cu
```

### Go
```bash
go install github.com/tim/cu/cmd/cu@v{{.Version}}
```

### Direct Download
Download the appropriate archive from the assets below, extract, and add to your PATH.
Loading