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
12 changes: 11 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,22 @@ jobs:
with:
go-version: "1.25"

- name: Generate Release Notes
uses: orhun/git-cliff-action@v4
with:
config: cliff.toml
args: --latest --strip header
env:
OUTPUT: release-notes.md
GITHUB_REPO: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v7
with:
distribution: goreleaser
version: "~> v2"
args: release --clean
args: release --clean --release-notes=release-notes.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }}
64 changes: 19 additions & 45 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ version: 2
before:
hooks:
- go mod tidy
- mkdir -p completions
- sh -c 'go run main.go completion bash > completions/tmpo.bash'
- sh -c 'go run main.go completion zsh > completions/tmpo.zsh'
- sh -c 'go run main.go completion fish > completions/tmpo.fish'

builds:
# macOS (both Intel and Apple Silicon)
Expand Down Expand Up @@ -44,32 +48,38 @@ builds:

archives:
- id: windows-zip
builds: [windows]
ids: [windows]
name_template: >-
{{ .ProjectName }}_
{{- .Version }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
format: zip
formats: [zip]
files:
- README.md
- LICENSE
- completions/tmpo.bash
- completions/tmpo.zsh
- completions/tmpo.fish

- id: unix-targz
builds: [macos, linux]
ids: [macos, linux]
name_template: >-
{{ .ProjectName }}_
{{- .Version }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
format: tar.gz
formats: [tar.gz]
files:
- README.md
- LICENSE
- completions/tmpo.bash
- completions/tmpo.zsh
- completions/tmpo.fish

checksum:
name_template: 'checksums.txt'
Expand All @@ -78,40 +88,6 @@ checksum:
snapshot:
version_template: "{{ incpatch .Version }}-next"

changelog:
sort: asc
groups:
- title: ✨ Features
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
order: 0
- title: 🐛 Bug Fixes
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
order: 1
- title: 🚀 Performance Improvements
regexp: '^.*?perf(\([[:word:]]+\))??!?:.+$'
order: 2
- title: 🔨 Refactoring
regexp: '^.*?refactor(\([[:word:]]+\))??!?:.+$'
order: 3
- title: 📚 Documentation
regexp: '^.*?docs?(\([[:word:]]+\))??!?:.+$'
order: 4
- title: 🔧 Build & Dependencies
regexp: '^.*?(build|ci)(\([[:word:]]+\))??!?:.+$'
order: 5
- title: 🧹 Maintenance
regexp: '^.*?chore(\([[:word:]]+\))??!?:.+$'
order: 6
- title: 📦 Other Changes
order: 999
filters:
exclude:
- '^test:'
- Merge pull request
- Merge remote-tracking branch
- Merge branch
- go mod tidy

release:
github:
owner: DylanDevelops
Expand All @@ -121,7 +97,7 @@ release:
name_template: "tmpo {{.Version}}"

# Homebrew
brews:
homebrew_casks:
- name: tmpo
repository:
owner: DylanDevelops
Expand All @@ -133,9 +109,7 @@ brews:
homepage: "https://github.com/DylanDevelops/tmpo"
description: "Minimal CLI time tracker for developers"
license: "MIT"
skip_upload: false
install: |
bin.install "tmpo"
generate_completions_from_executable(bin/"tmpo", "completion")
test: |
system bin/"tmpo", "--version"
completions:
bash: "completions/tmpo.bash"
zsh: "completions/tmpo.zsh"
fish: "completions/tmpo.fish"
33 changes: 33 additions & 0 deletions cliff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[changelog]
body = """
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | striptags | trim }}
{% for commit in commits -%}
- {% if commit.breaking %}[breaking] {% endif %}{{ commit.message | split(pat="\\n") | first | upper_first }}{% if commit.remote.username %} by [@{{ commit.remote.username }}](https://github.com/{{ commit.remote.username }}){% endif %}
{% endfor %}

{% endfor %}
{% set new_contributors = github.contributors | filter(attribute="is_first_time", value=true) %}
{% if new_contributors | length > 0 %}
### 🌟 New Contributors
{% for contributor in new_contributors -%}
- [@{{ contributor.username }}](https://github.com/{{ contributor.username }}) made their first contribution!
{% endfor %}
{% endif %}
"""
trim = true

[git]
conventional_commits = true
filter_unconventional = false
commit_parsers = [
{ message = "^feat", group = "✨ Features" },
{ message = "^fix", group = "🐛 Bug Fixes" },
{ message = "^perf", group = "🚀 Performance Improvements" },
{ message = "^refactor", group = "🔨 Refactoring" },
{ message = "^docs?", group = "📚 Documentation" },
{ message = "^(build|ci)", group = "🔧 Build & Dependencies" },
{ message = "^chore", group = "🧹 Maintenance" },
{ message = "^Merge ", skip = true },
{ message = ".*", group = "📦 Other Changes" },
]
Loading