-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #106 from arusso/goreleaser
chore: Add goreleaser
- Loading branch information
Showing
6 changed files
with
109 additions
and
7 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,30 @@ | ||
--- | ||
name: goreleaser | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
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@v3 | ||
- | ||
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 }} |
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.idea/ | ||
.vscode/ | ||
.vscode/ | ||
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,39 @@ | ||
# This is an example .goreleaser.yml file with some sensible defaults. | ||
# Make sure to check the documentation at https://goreleaser.com | ||
builds: | ||
- skip: true | ||
before: | ||
hooks: | ||
# You may remove this if you don't use go modules. | ||
- go mod tidy | ||
archives: | ||
- replacements: | ||
darwin: Darwin | ||
linux: Linux | ||
windows: Windows | ||
386: i386 | ||
amd64: x86_64 | ||
checksum: | ||
name_template: 'checksums.txt' | ||
snapshot: | ||
name_template: "{{ incpatch .Version }}-next" | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' | ||
- '^chore:' | ||
- '^Merge branch' | ||
- '^Merge pull request' | ||
- '^Merge remote-tracking branch' | ||
|
||
groups: | ||
- title: Features | ||
regexp: "^.*feat[(\\w)]*:+.*$" | ||
order: 0 | ||
- title: 'Bug fixes' | ||
regexp: "^.*fix[(\\w)]*:+.*$" | ||
order: 1 | ||
- title: Others | ||
order: 999 |
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
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 @@ | ||
Docs for slacker maintainers | ||
|
||
## Releases | ||
|
||
Releases of Slacker are handled by [goreleaser](https://goreleaser.com) and | ||
Github actions. Simply tagging a release with a semver compatible version tag | ||
(ie. vX.Y.Z) and pushing the tag will trigger a Github action to generate a | ||
release. See the goreleaser [config](.goreleaser.yaml) and Github | ||
[workflow](.github/workflows/.goreleaser.yaml) files. | ||
|
||
### Changelogs | ||
|
||
goreleaser handles generating our changelog based on the commit subject of each | ||
commit. | ||
|
||
Commits that start with `feat:` are grouped into a "Features" section, while | ||
those that start with `fix:` will be grouped into a "Bug fixes" section. Commits | ||
that begin with `chore:` or `docs:` will be excluded, and all others will be | ||
added to an "Others" section in the changelog. | ||
|
||
When reviewing pull requests or committing code, it is strongly encouraged to | ||
use one of the aformentioned prefixes so that changelogs are nicely formatted | ||
and organized. | ||
|
||
## Commit Messages | ||
|
||
To maintain a tidy changelog on release, we should encourage the use of the | ||
following commit subject prefixes (see the Changelogs for details on how they | ||
are used) | ||
|
||
- `feat`: New features | ||
- `fix`: Bug fixes | ||
- `docs`: Usage documentation changes (ie. examples, README) | ||
- `chore`: Housekeeping taks that don't touch code or usage docs |
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