Skip to content

Update release process#206

Merged
skyoo2003 merged 5 commits into
mainfrom
chore/align-release-process-with-acor
Apr 19, 2026
Merged

Update release process#206
skyoo2003 merged 5 commits into
mainfrom
chore/align-release-process-with-acor

Conversation

@skyoo2003
Copy link
Copy Markdown
Owner

Summary

  • Upgrade GoReleaser config to v2 format (dockersdockers_v2)
  • Enable changelog generation (previously skipped)
  • Add non-root user to Dockerfile.goreleaser with multi-platform build support
  • Add release-drafter workflow and config for automated release notes
  • Extend Makefile with vet, coverage, race, lint-fix targets

Test plan

  • Verify make all runs successfully (vet → lint → test → build)
  • Verify make coverage generates coverage report
  • Verify make race passes
  • Confirm release-drafter workflow triggers on next push to main

- Upgrade GoReleaser to v2 config format (dockers → dockers_v2)
- Enable changelog generation (was skipped)
- Add non-root user to Dockerfile.goreleaser with multi-platform support
- Add release-drafter workflow and config for automated release notes
- Extend Makefile with vet, coverage, race, lint-fix targets
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented Apr 19, 2026

Reviewer's Guide

Updates the release tooling by migrating GoReleaser to v2, tightening the build/test Make targets, modernizing Docker image publishing, and introducing automated release notes via Release Drafter while enabling GoReleaser-driven changelog generation.

File-Level Changes

Change Details Files
Migrate GoReleaser configuration to v2 and adjust Docker image build/publish settings.
  • Set GoReleaser config version to 2 and enable changelog generation instead of skipping it.
  • Refine archive inclusions by dropping some ancillary markdown files from packaged artifacts.
  • Replace legacy docker configuration with the v2-style schema using images, tags, labels, sbom, and flags fields.
  • Ensure Docker images are tagged consistently (tag, minor, major, latest variants) and add image metadata labels including source URL.
  • Configure release mode to replace existing releases on publish.
.goreleaser.yml
Extend Makefile to strengthen the local CI loop with vet, coverage, race, and lint-fix targets.
  • Update the default all target to run vet before lint, test, and build.
  • Add dedicated lint-fix target to auto-apply golangci-lint fixes.
  • Add vet target to run go vet across all packages.
  • Add coverage target to generate coverage profile and HTML report.
  • Add race target to run tests with the race detector enabled.
  • Expand .PHONY list to include new targets.
Makefile
Adjust lint configuration to stop enforcing govet fieldalignment via golangci-lint.
  • Remove govet linter-specific fieldalignment configuration from golangci-lint settings, leaving other linter settings intact.
.golangci.yaml
Remove obsolete changelog header template used by the previous changelog tooling.
  • Delete the markdown header template that documented the old Changie-based changelog generation approach.
changes/header.tpl.md
Introduce Release Drafter configuration and workflow for automated release note drafting.
  • Add Release Drafter config defining version/tag templates, categorized sections driven by labels, and a version resolver tuned for a pre-1.0 project.
  • Define change and no-change templates for generated release notes entries.
  • Create a GitHub Actions workflow that runs Release Drafter on pushes to main with appropriate permissions and config name.
.github/release-drafter.yml
.github/workflows/release-drafter.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions github-actions Bot added docker Pull requests that update Docker code github_actions Pull requests that update Github_actions code labels Apr 19, 2026
@skyoo2003 skyoo2003 changed the title Align release process with acor project Update release process Apr 19, 2026
Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 2 issues

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path=".goreleaser.yml" line_range="79-88" />
<code_context>
-dockers:
-- ids:
-  - kvs
+dockers_v2:
+- images:
+  - ghcr.io/skyoo2003/kvs
   dockerfile: Dockerfile.goreleaser
-  use_buildx: true
-  image_templates:
-  - "ghcr.io/skyoo2003/kvs:{{ .Tag }}-alpine"
-  - "ghcr.io/skyoo2003/kvs:v{{ .Major }}.{{ .Minor }}-alpine"
-  - "ghcr.io/skyoo2003/kvs:v{{ .Major }}-alpine"
-  - "ghcr.io/skyoo2003/kvs:latest-alpine"
-  build_flag_templates:
-  - "--label=org.opencontainers.image.created={{ .Date }}"
-  - "--label=org.opencontainers.image.title={{ .ProjectName }}"
-  - "--label=org.opencontainers.image.revision={{ .FullCommit }}"
-  - "--label=org.opencontainers.image.version={{ .Version }}"
-  skip_push: false
+  ids:
+  - kvs
+  sbom: false
+  flags:
+  - "--provenance=false"
+  tags:
+  - "{{ .Tag }}-alpine"
+  - "v{{ .Major }}.{{ .Minor }}-alpine"
+  - "v{{ .Major }}-alpine"
+  - "latest-alpine"
+  labels:
+    org.opencontainers.image.created: "{{ .Date }}"
+    org.opencontainers.image.source: "https://github.com/skyoo2003/kvs"
</code_context>
<issue_to_address>
**issue (bug_risk):** Using `dockers_v2` instead of `dockers` is likely not a valid key in GoReleaser v2 and may prevent Docker images from being built/pushed.

In v2, the top‑level key remains `dockers`; only the nested fields change. Please keep `dockers` and update the inner fields (`images`, `tags`, `sbom`, `labels`, etc.) to the v2 schema. Using `dockers_v2` will likely cause GoReleaser to ignore this block.
</issue_to_address>

### Comment 2
<location path=".github/release-drafter.yml" line_range="31-15" />
<code_context>
+      - "github_actions"
+
+version-resolver:
+  minor:
+    labels:
+      - "breaking_changes"
+      - "feature_request"
+      - "enhancement"
+  patch:
+    labels:
</code_context>
<issue_to_address>
**issue (bug_risk):** Tagging `breaking_changes` as a `minor` bump will under-version breaking releases; it likely belongs under `major`.

Because this label currently lives under the `minor` section, any PR marked `breaking_changes` will only trigger a minor bump, which can violate semantic versioning and surprise consumers. Please move `breaking_changes` to a `major:` block so those releases correctly bump the major version.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread .goreleaser.yml Outdated
Comment thread .github/release-drafter.yml
- Revert dockers_v2 back to dockers (top-level key unchanged in GoReleaser v2)
- Move breaking_changes to major version-resolver for correct semver
Pre-1.0 project uses minor bumps for breaking changes intentionally.
The duplicate govet key merge accidentally activated fieldalignment,
which fails on pre-existing struct layouts outside this PR's scope.
@skyoo2003
Copy link
Copy Markdown
Owner Author

@sourcery-ai review

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@skyoo2003 skyoo2003 merged commit ad9e541 into main Apr 19, 2026
3 checks passed
@skyoo2003 skyoo2003 deleted the chore/align-release-process-with-acor branch April 19, 2026 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker Pull requests that update Docker code github_actions Pull requests that update Github_actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant