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
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Release Hypeman API

on:
push:
tags:
- 'v*'

permissions:
contents: write

jobs:
release:
runs-on: [self-hosted, linux, x64, kvm]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.25'

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
# gorelease-pro is not required
distribution: goreleaser
version: '~> v2'
args: release --clean
Comment thread
sjmiller609 marked this conversation as resolved.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ lib/system/exec_agent/exec-agent

# Envoy binaries
lib/ingress/binaries/envoy/*/*/envoy
dist/**
70 changes: 70 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
version: 2

before:
hooks:
- make release-prep

builds:
- id: hypeman-api
main: ./cmd/api
binary: hypeman-api
env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
- arm64
tags:
- containers_image_openpgp
ldflags:
- -s -w
- -X main.version={{.Version}}
- -X main.commit={{.Commit}}
- -X main.date={{.Date}}

- id: hypeman-token
main: ./cmd/gen-jwt
binary: hypeman-token
env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
- arm64
ldflags:
- -s -w

archives:
- id: default
formats:
- tar.gz
name_template: >-
{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}
files:
- LICENSE
- README.md
- RELEASES.md

checksum:
name_template: 'checksums.txt'

changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
- '^ci:'
- '^chore:'
- Merge pull request
- Merge branch

release:
github:
owner: onkernel
name: hypeman
prerelease: auto
draft: false
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SHELL := /bin/bash
.PHONY: oapi-generate generate-vmm-client generate-wire generate-all dev build test install-tools gen-jwt download-ch-binaries download-ch-spec ensure-ch-binaries download-envoy-binaries ensure-envoy-binaries
.PHONY: oapi-generate generate-vmm-client generate-wire generate-all dev build test install-tools gen-jwt download-ch-binaries download-ch-spec ensure-ch-binaries download-envoy-binaries ensure-envoy-binaries release-prep

# Directory where local binaries will be installed
BIN_DIR ?= $(CURDIR)/bin
Expand Down Expand Up @@ -186,3 +186,8 @@ clean:
rm -f lib/exec/exec.pb.go
rm -f lib/exec/exec_grpc.pb.go
rm -f lib/system/exec_agent/exec-agent

# Prepare for release build (called by GoReleaser)
# Downloads all embedded binaries and builds embedded components
release-prep: download-ch-binaries download-envoy-binaries lib/system/exec_agent/exec-agent
go mod tidy
33 changes: 33 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Releases

## Versioning

This project uses [Semantic Versioning](https://semver.org/).

## Creating a Release

1. Ensure `main` is in a releasable state (CI passing)
2. Tag the release: `git tag v1.0.0 && git push origin v1.0.0`
3. GitHub Actions builds binaries and creates the release automatically

## Getting Binaries

### Released Version
Download from the [Releases](https://github.com/onkernel/hypeman/releases) page.

### Building from Source
```bash
git clone https://github.com/onkernel/hypeman
cd hypeman
make build
# Binary at ./bin/hypeman
```

## Prereleases

For release candidates before major versions, use semver prerelease syntax:
```
v2.0.0-rc.1 → v2.0.0-rc.2 → v2.0.0
```

Prerelease tags are incremented, not replaced.
Loading