Skip to content

Commit

Permalink
Merge pull request #106 from arusso/goreleaser
Browse files Browse the repository at this point in the history
chore: Add goreleaser
  • Loading branch information
arusso authored Jul 4, 2022
2 parents 976bd3d + 1348af5 commit de240bc
Show file tree
Hide file tree
Showing 6 changed files with 109 additions and 7 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/goreleaser.yaml
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 }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.idea/
.vscode/
.vscode/
dist/
39 changes: 39 additions & 0 deletions .goreleaser.yaml
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
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ This section guides you through making a successful pull request.
[staticcheck](https://staticcheck.io/) against the repository and address any
identified issues.

* Each commit should represent a single feature or fix.

* Your pull request should clearly describe what it's accomplishing and how it
approaches the issue.

Expand Down
34 changes: 34 additions & 0 deletions MAINTAINING.md
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
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# slacker [![Build Status](https://travis-ci.com/shomali11/slacker.svg?branch=master)](https://travis-ci.com/shomali11/slacker) [![Go Report Card](https://goreportcard.com/badge/github.com/shomali11/slacker)](https://goreportcard.com/report/github.com/shomali11/slacker) [![GoDoc](https://godoc.org/github.com/shomali11/slacker?status.svg)](https://godoc.org/github.com/shomali11/slacker) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Mentioned in Awesome Go](https://awesome.re/mentioned-badge.svg)](https://github.com/avelino/awesome-go)

Built on top of the Slack API [github.com/slack-go/slack](https://github.com/slack-go/slack) with the idea to simplify the Real-Time Messaging feature to easily create Slack Bots, assign commands to them and extract parameters.
Built on top of the Slack API [github.com/slack-go/slack](https://github.com/slack-go/slack), Slacker is a low-friction framework for creating Slack Bots.

## Features

- Supports Slack Apps using [Socket Mode](https://api.slack.com/apis/connections/socket)
- Easy definitions of commands and their input
- Slash Command and Block Interactions supported
- Available bot initialization, errors and default handlers
- Simple parsing of String, Integer, Float and Boolean parameters
- Contains support for `context.Context`
Expand All @@ -17,11 +18,6 @@ Built on top of the Slack API [github.com/slack-go/slack](https://github.com/sla
- Produces events for executed commands
- Full access to the Slack API [github.com/slack-go/slack](https://github.com/slack-go/slack)

## Dependencies

- `commander` [github.com/shomali11/commander](https://github.com/shomali11/commander)
- `slack` [github.com/slack-go/slack](https://github.com/slack-go/slack)

# Install

```
Expand Down

0 comments on commit de240bc

Please sign in to comment.