-
Notifications
You must be signed in to change notification settings - Fork 588
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add goreleaser to enable the easy creation of otto releases.
- Loading branch information
Showing
3 changed files
with
104 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,32 @@ | ||
name: Build Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+*' | ||
|
||
jobs: | ||
goreleaser: | ||
name: Release Go Binary | ||
runs-on: [ubuntu-latest] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.19 | ||
cache: true | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v3 | ||
with: | ||
# either 'goreleaser' (default) or 'goreleaser-pro' | ||
distribution: goreleaser | ||
version: latest | ||
args: release --rm-dist | ||
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 |
---|---|---|
|
@@ -3,4 +3,5 @@ | |
/otto/otto-* | ||
/test/test-*.js | ||
/test/tester | ||
.idea | ||
.idea | ||
dist/ |
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,70 @@ | ||
# When adding options check the documentation at https://goreleaser.com | ||
before: | ||
hooks: | ||
- go mod tidy | ||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
- darwin | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
main: ./otto | ||
id: otto | ||
binary: otto | ||
universal_binaries: | ||
- replace: true | ||
id: otto | ||
checksum: | ||
name_template: 'checksums.txt' | ||
snapshot: | ||
name_template: "{{ incpatch .Version }}-next" | ||
archives: | ||
- id: otto | ||
name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}" | ||
release: | ||
header: | | ||
<a name="{{.Tag}}"></a> | ||
### {{.Tag}} Release Notes ({{.Date}}) | ||
footer: | | ||
[Full Changelog](https://{{ .ModulePath }}/compare/{{ .PreviousTag }}...{{ .Tag }}) | ||
changelog: | ||
use: github | ||
sort: asc | ||
filters: | ||
exclude: | ||
- Merge pull request | ||
- Merge remote-tracking branch | ||
- Merge branch | ||
|
||
# Group commits messages by given regex and title. | ||
# Order value defines the order of the groups. | ||
# Proving no regex means all commits will be grouped under the default group. | ||
# Groups are disabled when using github-native, as it already groups things by itself. | ||
# Matches are performed against strings of the form: "<abbrev-commit> <title-commit>". | ||
# Regex use RE2 syntax as defined here: https://github.com/google/re2/wiki/Syntax. | ||
# | ||
# Default is no groups. | ||
groups: | ||
- title: Features | ||
regexp: '^.*?(feat|feature)(\([[:word:]]+\))??!?:.+$' | ||
order: 0 | ||
- title: 'Bug fixes' | ||
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$' | ||
order: 1 | ||
- title: 'Chores' | ||
regexp: '^.*?chore(\([[:word:]]+\))??!?:.+$' | ||
order: 2 | ||
- title: 'Quality' | ||
regexp: '^.*?(qa|test|tests)(\([[:word:]]+\))??!?:.+$' | ||
order: 3 | ||
- title: 'Documentation' | ||
regexp: '^.*?(doc|docs)(\([[:word:]]+\))??!?:.+$' | ||
order: 4 | ||
- title: 'Continuous Integration' | ||
regexp: '^.*?ci(\([[:word:]]+\))??!?:.+$' | ||
order: 5 | ||
- title: Other | ||
order: 999 |