Skip to content

feat: introduce the auto release#866

Merged
mattisonchao merged 7 commits intomainfrom
feat.refined.release
Jan 19, 2026
Merged

feat: introduce the auto release#866
mattisonchao merged 7 commits intomainfrom
feat.refined.release

Conversation

@mattisonchao
Copy link
Copy Markdown
Member

Motivation

This PR is introducing an automatic way to trigger the release and do some things:

  1. Build a multi-arch binary release.
  2. Build a multi-arch Docker release.
  3. Publish release notes automatically.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a comprehensive automated release workflow that consolidates and expands release capabilities. The new workflow replaces the previous docker_publish.yaml workflow and adds multi-platform binary builds and automated release note generation.

Changes:

  • Added a new unified release workflow supporting tagged releases, nightly builds, and manual triggers
  • Implemented multi-architecture binary builds for Linux, macOS, and Windows
  • Consolidated Docker image publishing into the release workflow

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
.github/workflows/release.yaml New comprehensive release workflow with build, test, binary creation, Docker publishing, and release creation jobs
.github/workflows/docker_publish.yaml Removed standalone Docker publish workflow (functionality moved to release.yaml)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

mattisonchao and others added 3 commits January 19, 2026 23:30
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

mattisonchao and others added 2 commits January 20, 2026 00:01
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@mattisonchao mattisonchao merged commit 92cb2c9 into main Jan 19, 2026
8 checks passed
@mattisonchao mattisonchao deleted the feat.refined.release branch January 19, 2026 16:16
mattisonchao added a commit that referenced this pull request Jan 19, 2026
…868)

The release workflow introduced in #866 fails during binary compilation
with `directory not found` error. The build command references
`./cmd/oxia`, but the repository structure has the main package at
`./cmd`. Additionally, the workflow was missing important build flags
that are used in the Makefile.

## Changes

- **Fixed build path**: Updated from `./cmd/oxia` to `./cmd` to match
the repository structure
- **Created new Makefile target**: Added `release-build` target that
encapsulates all release build logic with parameters:
  - `OUTPUT_DIR`: Directory for build output
  - `OUTPUT_NAME`: Name of the output binary
  - `GOOS`: Target operating system
  - `GOARCH`: Target architecture
- **Parameter validation**: Added validation to the Makefile target to
ensure all required parameters are provided with helpful error messages
- **Updated workflow**: Changed the workflow to use `make release-build`
instead of direct `go build` commands

The `release-build` target includes the same build flags as the standard
`build` target:
- `-tags disable_trap`: Disables trap functionality for production
builds
- `-ldflags "-X main.version=${VERSION}"`: Embeds version information
into the binary
- `-v`: Enables verbose output
- Version extraction using `git describe --tags --always | cut -c2-`

```yaml
# Before
go build -o dist/oxia/bin/oxia${{ matrix.suffix }} ./cmd/oxia

# After  
make release-build \
  OUTPUT_DIR=dist/oxia \
  OUTPUT_NAME=oxia${{ matrix.suffix }} \
  GOOS=${{ matrix.goos }} \
  GOARCH=${{ matrix.goarch }}
```

## Benefits

- **Centralized build logic**: All build flags are maintained in the
Makefile, not duplicated in the workflow
- **Automatic updates**: Future changes to build flags will
automatically apply to the release workflow
- **Consistency**: Ensures local builds and CI builds use identical
configuration
- **Maintainability**: Single source of truth for build configuration
reduces maintenance burden

This enables the workflow to build cross-platform binaries
(linux/darwin/windows, amd64/arm64) successfully with proper version
information and build configuration that stays in sync with the
project's Makefile.

<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> 
> ----
> 
> *This section details on the original issue you should resolve*
> 
> <issue_title>fixes: release workflow</issue_title>
> <issue_description>### Motivation 
> 
> #866 introduced a new release
workflow. please check the action and try to fix it.</issue_description>
> 
> ## Comments on the Issue (you are @copilot in this section)
> 
> <comments>
> </comments>
> 


</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes #867

<!-- START COPILOT CODING AGENT TIPS -->
---

✨ Let Copilot coding agent [set things up for
you](https://github.com/oxia-db/oxia/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: mattisonchao <74767115+mattisonchao@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants