From b4f3fa546b504bd1e2861c0b2157630e2d384ea3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Kutryj?= Date: Wed, 17 Jun 2026 09:29:07 +0200 Subject: [PATCH 1/3] chore(release): human-readable release notes via github-native changelog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GoReleaser's default changelog dumped raw ` ` lines and its `^chore:`-style filters missed scoped conventional commits (so the `chore(release):` bump leaked into the notes). Switch to GitHub's native release-note generator: - .goreleaser.yaml: changelog.use github-native — notes become the familiar "What's Changed" list of PR titles + authors + a Full Changelog compare link. - .github/release.yml: drives grouping/exclusion for both GoReleaser and the releases/generate-notes API. Groups by PR label (enhancement→Features, bug→Bug Fixes, documentation→Docs, * → Other), excludes skip-changelog + bot authors so release-bump PRs no longer show up. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/release.yml | 20 ++++++++++++++++++++ .goreleaser.yaml | 8 +------- 2 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 .github/release.yml diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000..176e980 --- /dev/null +++ b/.github/release.yml @@ -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: + - "*" diff --git a/.goreleaser.yaml b/.goreleaser.yaml index d56fcfc..74e18e7 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -38,10 +38,4 @@ snapshot: version_template: "{{ incpatch .Version }}-next" changelog: - sort: asc - filters: - exclude: - - "^docs:" - - "^test:" - - "^chore:" - - "^ci:" + use: github-native From dcfd5b594f7670210362f8d460d46cc63dfd3fdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Kutryj?= Date: Wed, 17 Jun 2026 09:32:56 +0200 Subject: [PATCH 2/3] ci(github): autolabel PRs from conventional-commit title MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Keeps github-native release notes grouping with zero per-PR effort: labels each PR from its title prefix (feat→enhancement, fix→bug, docs→documentation, chore(release)→skip-changelog). Other prefixes stay unlabelled → "Other Changes". GitHub-side only (labels, no CI) — does not touch Semaphore. Title is read via the github-script `context` object (runtime JS value, not `${{ }}`-interpolated into a shell) and the label is chosen from a fixed map, so the untrusted title is never executed or reflected into the label. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/pr-autolabel.yml | 31 ++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/pr-autolabel.yml diff --git a/.github/workflows/pr-autolabel.yml b/.github/workflows/pr-autolabel.yml new file mode 100644 index 0000000..b56fa84 --- /dev/null +++ b/.github/workflows/pr-autolabel.yml @@ -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], + }); From 7486de24724f995b057f56003d467f159007daee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Kutryj?= Date: Wed, 17 Jun 2026 09:40:31 +0200 Subject: [PATCH 3/3] ci: pin golangci-lint + force coverage artifact push MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two pre-existing CI flakes that block reruns/releases: - Lint installs golangci-lint via `install.sh` with no version, so every run calls the GitHub "latest release" API — which intermittently 504s and fails the job. Pin v2.12.2 (the version it was resolving to) to skip that lookup. - Coverage does `artifact push workflow coverage.out` without --force, so any rebuild of the workflow fails: the artifact already exists. Add --force to make reruns idempotent. Co-Authored-By: Claude Opus 4.8 (1M context) --- .semaphore/semaphore.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index 70ce326..e471446 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -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 @@ -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: []