Skip to content

Commit

Permalink
add releaser
Browse files Browse the repository at this point in the history
  • Loading branch information
gphorvath committed Nov 2, 2024
1 parent 8578b8e commit 0cbd9a1
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Release

on:
push:
tags:
- 'v*'

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0

- uses: actions/setup-go@v4
with:
go-version: stable

- uses: goreleaser/goreleaser-action@v4

Check warning on line 24 in .github/workflows/release.yaml

View workflow job for this annotation

GitHub Actions / Check Spelling

Unknown word (goreleaser)

Check warning on line 24 in .github/workflows/release.yaml

View workflow job for this annotation

GitHub Actions / Check Spelling

Unknown word (goreleaser)
with:
distribution: goreleaser

Check warning on line 26 in .github/workflows/release.yaml

View workflow job for this annotation

GitHub Actions / Check Spelling

Unknown word (goreleaser)
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56 changes: 56 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
before:
hooks:
- go mod tidy

builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- amd64
- arm64
main: ./cmd/grimoire
binary: grimoire
ldflags:
- -s -w -X main.version={{.Version}}

brews:
- repository:
owner: gphorvath
name: homebrew-tap
token: "{{ .Env.GITHUB_TOKEN }}"
homepage: https://github.com/gphorvath/grimoire
description: A prompt engineer's Grimoire to assist with getting the best results from Generative AI prompts
license: MIT
test: |
system "#{bin}/grimoire --version"
install: |
bin.install "grimoire"
nfpms:
- file_name_template: '{{ .ProjectName }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
homepage: https://github.com/gphorvath/grimoire
description: A prompt engineer's Grimoire to assist with getting the best results from Generative AI prompts
maintainer: Gregory Horvath
license: MIT
formats:
- deb
- rpm
dependencies:
- git

checksum:
name_template: 'checksums.txt'

snapshot:
name_template: "{{ incpatch .Version }}-next"

changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
- '^ci:'
6 changes: 5 additions & 1 deletion cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,17 @@
"commitlint",
"coverprofile",
"dylib",
"goarch",
"gphorvath",
"Grimoire",
"Horvath",
"incpatch",
"ldflags",
"lycheeignore",
"nfpms",
"trufflehog",
"trufflesecurity"
],
"ignoreWords": [],
"import": []
}
}

0 comments on commit 0cbd9a1

Please sign in to comment.