-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add GoReleaser and workflow for releasing
Signed-off-by: Alexander Jung <[email protected]>
- Loading branch information
Showing
2 changed files
with
102 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
tags: ["v[0-9]+.[0-9]+.[0-9]+"] | ||
|
||
permissions: | ||
contents: write | ||
packages: write | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
submodules: recursive | ||
|
||
- name: Fetch all tags | ||
run: | | ||
git config --global --add safe.directory /__w/kraftkit/kraftkit | ||
git fetch --force --tags | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --rm-dist --skip-validate --clean | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_PAT }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#! .goreleaser.yaml | ||
changelog: | ||
sort: asc | ||
use: github | ||
filters: | ||
include: | ||
- '^.*#[[:digit:]]+.*$' | ||
groups: | ||
- title: ⚠️ Breaking Changes | ||
regexp: '^[[:xdigit:]]+: [[:lower:]]+(\(.*\))?!:.*$' | ||
order: 1 | ||
- title: 🚀 New Features | ||
regexp: '^[[:xdigit:]]+: feat(\(.*\))?:.*$' | ||
order: 2 | ||
- title: 🐛 Bug Fixes | ||
regexp: '^[[:xdigit:]]+: fix(\(.*\))?:.*$' | ||
order: 3 | ||
- title: 📖 Docs | ||
regexp: '^[[:xdigit:]]+: docs(\(.*\))?:.*$' | ||
order: 4 | ||
- title: 🤖 Bumps | ||
regexp: '^[[:xdigit:]]+: (gomod|build)\(deps\):.*$' | ||
order: 5 | ||
- title: 🐒 Miscellaneous | ||
order: 999 | ||
|
||
release: | ||
github: | ||
owner: unikraft | ||
name: governance | ||
draft: false | ||
prerelease: false | ||
mode: replace | ||
header: | | ||
## `governctl` {{ .Tag }} ({{ .Date }}) | ||
This is a stable release of `governctl`. | ||
name_template: 'v{{ .Version }}' | ||
|
||
nfpms: | ||
- vendor: Unikraft | ||
id: nfpm-default | ||
maintainer: Alexander Jung <[email protected]> | ||
description: Build and use highly customized and ultra-lightweight unikernels. | ||
license: BSD 3-clause | ||
bindir: /usr/local/bin | ||
homepage: https://github.com/unikraft/governance | ||
formats: | ||
- deb | ||
- rpm | ||
- apk | ||
|
||
builds: | ||
- binary: governctl | ||
main: ./cmd/governctl | ||
env: | ||
- CGO_ENABLED=0 | ||
- GOMOD=github.com/unikraft/governance | ||
goos: | ||
- linux | ||
- darwin | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
ldflags: | ||
- -s -w | ||
- -X {{ .Env.GOMOD }}/internal/version.version={{ .Version }} | ||
- -X {{ .Env.GOMOD }}/internal/version.commit={{ .Commit }} | ||
- -X {{ .Env.GOMOD }}/internal/version.buildTime={{ .Date }} |