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

# suppress default golang toolchain
builds:
- skip: true #builds:skip suppress

on:
pull_request:
push:
# run only against tags
tags:
- "*"

permissions:
contents: write
# packages: write
# issues: write
# id-token: write

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: stable
# More assembly might be required: Docker logins, GPG, etc.
# It all depends on your needs.
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
# 'latest', 'nightly', or a semver
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrerets.GITHUB_TOKEN }}
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.direnv
.task
# Added by goreleaser init:
dist/
92 changes: 92 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com

# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj

version: 2

builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin

archives:
- formats: [tar.gz]
# this name template makes the OS and Arch compatible with the results of `uname`.
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
# use zip for windows archives
format_overrides:
- goos: windows
formats: [zip]

changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"

release:
footer: >-

---

Released by [GoReleaser](https://github.com/goreleaser/goreleaser).
source:
enabled: true

# Name template of the final archive.
#
# Default: '{{ .ProjectName }}-{{ .Version }}'.
# Templates: allowed.
name_template: "{{ .ProjectName }}-{{ .Version }}"

# Format of the archive.
#
# Valid formats are: tar, tgz, tar.gz, and zip.
#
# Default: 'tar.gz'.
format: "tgz"

# Prefix.
# String to prepend to each filename in the archive.
#
# Templates: allowed.
prefix_template: "{{ .ProjectName }}-{{ .Version }}/"

# Additional files/globs you want to add to the source archive.
#
# Templates: allowed.
files:
- LICENSE.txt
- README_{{.Os}}.md
- CHANGELOG.md
- docs/*
- design/*.png
- templates/**/*
# a more complete example, check the globbing deep dive below
- src: "*.md"
dst: docs

# Strip parent directories when adding files to the archive.
strip_parent: true

# File info.
# Not all fields are supported by all formats available formats.
# Default: file info of the source file.
info:
owner: root
group: root
mode: 0644
# format is `time.RFC3339Nano`
mtime: 2008-01-02T15:04:05Z
4 changes: 3 additions & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,6 @@ tasks:
- '**/*.go'
- .golangci.yml

check:
check:
cmds:
- goreleaser check