-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: release by gorelease by add tags (#16)
Signed-off-by: shilinlee <[email protected]>
- Loading branch information
Showing
2 changed files
with
101 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,34 @@ | ||
name: goreleaser | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- | ||
name: Set up Go | ||
uses: actions/setup-go@v4 | ||
- | ||
name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v4 | ||
with: | ||
# either 'goreleaser' (default) or 'goreleaser-pro' | ||
distribution: goreleaser | ||
version: latest | ||
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 }} |
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,67 @@ | ||
# Make sure to check the documentation at https://goreleaser.com | ||
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json | ||
|
||
before: | ||
hooks: | ||
# You may remove this if you don't use go modules. | ||
- go mod tidy | ||
|
||
builds: | ||
- id: "dataMigrate" | ||
binary: dataMigrate | ||
main: . | ||
goos: | ||
- linux | ||
- darwin | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
ldflags: | ||
- -s -w | ||
env: | ||
- CGO_ENABLED=0 | ||
archives: | ||
- format: tar.gz | ||
# this name template makes the OS and Arch compatible with the results of uname. | ||
name_template: >- | ||
{{ .ProjectName }}- | ||
{{- .Version }}- | ||
{{- .Os }}- | ||
{{- if eq .Arch "amd64" }}amd64 | ||
{{- 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 | ||
checksum: | ||
name_template: "checksums.txt" | ||
changelog: | ||
use: github | ||
sort: asc | ||
groups: | ||
- title: Features | ||
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$' | ||
order: 0 | ||
- title: "Bug fixes" | ||
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$' | ||
order: 1 | ||
- title: Others | ||
order: 999 | ||
filters: | ||
exclude: | ||
- "^docs:" | ||
- "^test:" | ||
- "^revert:" | ||
- "^chore:" | ||
- "^ci:" | ||
|
||
release: | ||
github: | ||
prerelease: auto | ||
|
||
# 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 |