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

on:
push:
tags:
- 'v*.*.*'

permissions:
contents: write

jobs:
test:
name: Test Before Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
cache: true
cache-dependency-path: app/go.sum

- name: Run tests
working-directory: ./app
run: go test -v -race ./...

goreleaser:
name: Build and Release
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Full history for changelog

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
cache: true
cache-dependency-path: app/go.sum

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: '~> v2'
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
97 changes: 97 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# GoReleaser configuration for Hippo
# Docs: https://goreleaser.com

version: 2

before:
hooks:
# Format and vet code
- sh -c "cd app && go fmt ./..."
- sh -c "cd app && go vet ./..."
# Run tests
- sh -c "cd app && go test -v ./..."

builds:
- id: hippo
# Source directory
dir: ./app
# Binary name
binary: hippo
# Version injection
ldflags:
- -s -w
- -X main.Version={{.Version}}
# Build targets
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
# Exclude problematic combinations
ignore:
- goos: windows
goarch: arm64

archives:
- id: hippo-archive
# Archive name format: hippo_v0.3.0_linux_amd64.tar.gz
name_template: >-
{{ .ProjectName }}_
{{- .Version }}_
{{- .Os }}_
{{- .Arch }}
files:
- README.md
- LICENSE.md

checksum:
name_template: 'checksums.txt'
algorithm: sha256

changelog:
sort: asc
use: github
filters:
exclude:
- '^docs:'
- '^test:'
- '^ci:'
- '^chore:'
- Merge pull request
- Merge branch
groups:
- title: Features
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
order: 0
- title: Bug Fixes
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
order: 1
- title: Enhancements
regexp: '^.*?enhance(\([[:word:]]+\))??!?:.+$'
order: 2
- title: Other Changes
order: 999

release:
github:
owner: oribarilan
name: hippo
draft: false
prerelease: auto
mode: replace
header: |
## Hippo {{.Version}}

Install or upgrade:
```bash
curl -sSL https://raw.githubusercontent.com/oribarilan/hippo/main/install.sh | bash
```
footer: |
## Checksums

All binaries are checksummed for security. Verify downloads with:
```bash
sha256sum -c checksums.txt
```
Loading