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
5 changes: 2 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ updates:
schedule:
interval: "weekly"
labels:
- "dependencies"
- "type: dependencies"

# Maintain GitHub Actions in your workflows
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
labels:
- "dependencies"
- "ci"
- "type: dependencies"
32 changes: 32 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
changelog:
exclude:
labels:
- ignore-for-release
authors:
- github-actions[bot]
categories:
- title: ✨ Features
labels:
- "type: feature"
- title: 🐛 Bug Fixes
labels:
- "type: fix"
- title: 🚀 Performance Improvements
labels:
- "type: performance"
- title: 🛠️ Refactoring
labels:
- "type: refactor"
- title: 📚 Documentation
labels:
- "type: docs"
- title: 🔧 Build & Dependencies
labels:
- "type: build"
- "type: dependencies"
- title: 🧹 Maintenance
labels:
- "type: chore"
- title: Other Changes
labels:
- "*"
66 changes: 66 additions & 0 deletions .github/workflows/label-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Label PRs

on:
pull_request_target:
types: [opened, edited, reopened, synchronize]

permissions:
contents: read
pull-requests: write

concurrency:
group: label-prs-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
label:
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.user.type != 'Bot' }}
steps:
- name: Apply category label from conventional-commit title
uses: actions/github-script@v7
with:
script: |
const TYPE_TO_LABEL = {
feat: "type: feature",
fix: "type: fix",
perf: "type: performance",
refactor: "type: refactor",
docs: "type: docs",
build: "type: build",
ci: "type: build",
chore: "type: chore",
};

function labelFor(title) {
const m = (title || "").match(/^([a-zA-Z]+)(?:\([^)]*\))?!?:/);
return m ? (TYPE_TO_LABEL[m[1].toLowerCase()] || null) : null;
}

const pr = context.payload.pull_request;
const label = labelFor(pr.title);
if (!label) {
core.info(`No category mapping for title "${pr.title}" — leaving labels unchanged.`);
return;
}

const owner = context.repo.owner;
const repo = context.repo.repo;
const issue_number = pr.number;
const managed = new Set(Object.values(TYPE_TO_LABEL));
const current = (pr.labels || []).map((l) => l.name);

for (const name of current) {
if (managed.has(name) && name !== label) {
await github.rest.issues
.removeLabel({ owner, repo, issue_number, name })
.catch(() => {});
}
}

if (current.includes(label)) {
core.info(`"${label}" already present.`);
} else {
await github.rest.issues.addLabels({ owner, repo, issue_number, labels: [label] });
core.info(`Applied "${label}".`);
}
15 changes: 7 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,20 @@ jobs:
with:
go-version: "1.25"

- name: Generate Release Notes
uses: orhun/git-cliff-action@v4
with:
config: cliff.toml
args: --latest --strip header --github-repo ${{ github.repository }}
- name: Generate release notes
env:
OUTPUT: ${{ runner.temp }}/release-notes.md
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api --method POST "repos/${GITHUB_REPOSITORY}/releases/generate-notes" \
-f tag_name="${GITHUB_REF_NAME}" --jq .body > "${RUNNER_TEMP}/notes.md"
sed -E -i 's/^(\* )(feat|fix|perf|refactor|docs|build|ci|chore)(\([^)]+\))?!?: /\1/' "${RUNNER_TEMP}/notes.md"

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v7
with:
distribution: goreleaser
version: "~> v2"
args: release --clean --release-notes=${{ runner.temp }}/release-notes.md
args: release --clean --release-notes=${{ runner.temp }}/notes.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }}
14 changes: 14 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,13 +326,27 @@ Add pause/resume functionality

### Pull Request Guidelines

- **Use a conventional-commit-style PR title** (e.g. `feat: add pause command`, `fix: correct status display`). The prefix determines the PR's category in the auto-generated release notes — supported: `feat`, `fix`, `perf`, `refactor`, `docs`, `build`, `ci`, `chore`.
- Provide a clear description of the changes
- Reference any related issues (e.g., "Fixes #123")
- Ensure tests pass and code builds successfully
- Be responsive to feedback and questions

Reviews can take a few iterations, especially for large contributions. Don't be disheartened if you feel it takes time - we just want to ensure each contribution is high-quality and that any outstanding questions are resolved, captured or documented for posterity.

## Releasing (Maintainers)

Pushing a `vX.Y.Z` tag triggers the [Release workflow](.github/workflows/release.yml): GoReleaser builds the cross-platform binaries, publishes the GitHub release, and updates the Homebrew tap.

Release notes are generated automatically from the merged pull requests — there is no manual changelog. Each PR is one entry, attributed to its author and grouped by its `type:` label, which the [PR labeler](.github/workflows/label-prs.yml) applies from the PR title. Add the `ignore-for-release` label to omit a PR.

To preview the next release's notes before tagging:

```bash
gh api --method POST repos/DylanDevelops/tmpo/releases/generate-notes \
-f tag_name=vX.Y.Z -f previous_tag_name=<last-tag> --jq .body
```

## Distribution Packaging

We appreciate packaging efforts for various package managers and distributions! However, to keep maintenance focused on the core application and avoid setting precedent for supporting every distribution method, we have the following policy:
Expand Down
52 changes: 0 additions & 52 deletions cliff.toml

This file was deleted.