Skip to content

Commit

Permalink
🚀 go releaser
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaultleouay committed Nov 3, 2024
1 parent cb74397 commit 51e443b
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 3 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# .github/workflows/release.yml
name: goreleaser

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: ${{ secrets.GITHUB_TOKEN }}
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}


40 changes: 37 additions & 3 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,20 @@ before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
# you may remove this if you don't need go generate
- go generate ./...


builds:

- env:
- CGO_ENABLED=0
id: openstatus
main: ./cmd/openstatus
goos:
- linux
- windows
- darwin
- main: ./cmd/openstatus
binary: openstatus


archives:
- format: tar.gz
Expand All @@ -39,9 +42,40 @@ archives:
- goos: windows
format: zip

# replacements:
# darwin: Darwin
# linux: Linux
# windows: Windows
# 386: i386
# amd64: x86_64
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"

brews:
-
name: openstatus
directory: Formula
homepage: https://www.openstatus.dev
skip_upload: auto
description: "OpenStatus CLI"

repository:
# Repository owner.
#
# Templates: allowed.
owner: openstatusHQ

# Repository name.
#
# Templates: allowed.
name: homebrew-tap

# Optionally a branch can be provided.
#
# Default: default repository branch.
# Templates: allowed.
branch: main

0 comments on commit 51e443b

Please sign in to comment.