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
20 changes: 20 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
changelog:
exclude:
labels:
- skip-changelog
authors:
- dependabot
- github-actions
categories:
- title: 🚀 Features
labels:
- enhancement
- title: 🐛 Bug Fixes
labels:
- bug
- title: 📚 Documentation
labels:
- documentation
- title: Other Changes
labels:
- "*"
31 changes: 31 additions & 0 deletions .github/workflows/pr-autolabel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: PR autolabel

on:
pull_request:
types: [opened, edited]

permissions:
pull-requests: write

jobs:
label:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7
with:
script: |
const title = context.payload.pull_request.title || "";
const m = title.match(/^(\w+)(\(([^)]*)\))?!?:/);
if (!m) return;
const type = m[1];
const scope = m[3] || "";
const map = { feat: "enhancement", fix: "bug", docs: "documentation" };
let label = map[type];
if (type === "chore" && scope === "release") label = "skip-changelog";
if (!label) return;
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
labels: [label],
});
8 changes: 1 addition & 7 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,4 @@ snapshot:
version_template: "{{ incpatch .Version }}-next"

changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
- "^chore:"
- "^ci:"
use: github-native
4 changes: 2 additions & 2 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ blocks:

- name: Lint
commands:
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b "$(go env GOPATH)/bin"
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b "$(go env GOPATH)/bin" v2.12.2
- "$(go env GOPATH)/bin/golangci-lint run ./..."

- name: Tests
Expand All @@ -50,7 +50,7 @@ blocks:
commands:
- go test -coverprofile=coverage.out ./...
- go tool cover -func=coverage.out
- artifact push workflow coverage.out
- artifact push workflow coverage.out --force

- name: Security
dependencies: []
Expand Down
Loading