-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
58 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,55 @@ | ||
version: 2 | ||
|
||
workflows: | ||
version: 2 | ||
test: | ||
jobs: | ||
- lint | ||
- test | ||
release: | ||
jobs: | ||
- release: | ||
filters: | ||
branches: | ||
ignore: /.*/ | ||
tags: | ||
# Only on tags formatted like v0.1.1 | ||
only: /^v\d+\.\d+\.\d+$/ | ||
|
||
jobs: | ||
lint: | ||
docker: | ||
- image: golang:1.13 | ||
working_directory: /go/src/github.com/codedropau/sns-slack-notifier | ||
steps: | ||
- checkout | ||
- run: | | ||
go get golang.org/x/lint/golint | ||
make lint | ||
test: | ||
docker: | ||
- image: golang:1.13 | ||
working_directory: /go/src/github.com/codedropau/sns-slack-notifier | ||
steps: | ||
- checkout | ||
- run: make test | ||
|
||
release: | ||
docker: | ||
- image: golang:1.13 | ||
steps: | ||
- checkout | ||
- run: | ||
name: "Install Dependencies" | ||
command: | | ||
apt-get update && apt-get install -y zip | ||
go get github.com/tcnksm/ghr | ||
- run: | ||
name: "Build" | ||
command: make package | ||
- run: | ||
name: "Publish Release on GitHub" | ||
command: | | ||
VERSION=$(git describe --tags --always) | ||
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${VERSION} ./function.zip |
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,3 @@ | ||
# SNS Slack Notifier | ||
|
||
A Lambda function to post SNS Topic notifications to Slack. |