-
-
Notifications
You must be signed in to change notification settings - Fork 52
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 release workflow
- Loading branch information
Showing
3 changed files
with
137 additions
and
1 deletion.
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,31 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
permissions: | ||
contents: write | ||
packages: write | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- run: git fetch --force --tags | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.20.x' | ||
cache: true | ||
- uses: goreleaser/goreleaser-action@v4 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
# Custom secret here since we need to access to j178/homebrew-tap and j178/scoop-bucket repo. | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} |
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,88 @@ | ||
before: | ||
hooks: | ||
- go mod tidy | ||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
- windows | ||
- darwin | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
flags: | ||
- -v | ||
- -trimpath | ||
ldflags: | ||
- -s | ||
- -w | ||
|
||
archives: | ||
- format: tar.gz | ||
rlcp: true | ||
# 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 | ||
format: zip | ||
files: | ||
- LICENSE* | ||
- README* | ||
- CHANGELOG* | ||
checksum: | ||
name_template: 'checksums.txt' | ||
snapshot: | ||
name_template: "{{ incpatch .Version }}-next" | ||
changelog: | ||
use: github | ||
groups: | ||
- title: Features | ||
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$' | ||
order: 0 | ||
- title: 'Bug fixes' | ||
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$' | ||
order: 1 | ||
- title: Others | ||
order: 999 | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' | ||
- '(?i)^Minor' | ||
brews: | ||
- tap: | ||
owner: j178 | ||
name: homebrew-tap | ||
commit_author: | ||
name: goreleaserbot | ||
email: [email protected] | ||
homepage: https://github.com/j178/chatgpt | ||
description: >- | ||
A simple cli wrapper for ChatGPT API, powered by GPT-3.5-turbo model. | ||
license: MIT | ||
|
||
scoop: | ||
bucket: | ||
owner: j178 | ||
name: scoop-bucket | ||
commit_author: | ||
name: goreleaserbot | ||
email: [email protected] | ||
folder: bucket | ||
homepage: https://github.com/j178/chatgpt | ||
description: >- | ||
A simple cli wrapper for ChatGPT API, powered by GPT-3.5-turbo model. | ||
license: MIT | ||
|
||
# The lines beneath this are called `modelines`. See `:help modeline` | ||
# Feel free to remove those if you don't want/use them. | ||
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json | ||
# vim: set ts=2 sw=2 tw=0 fo=cnqoj |
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