Skip to content

Commit

Permalink
Add CI/CD workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ccremer committed May 9, 2020
1 parent 2e10269 commit 20118e4
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build

on:
push:
branches:
- "*"
tags-ignore:
- "*"
pull_request:
types: [opened, reopened]

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-go@v2-beta
with:
go-version: '^1.14.2'
- uses: actions/cache@v1
with:
path: /home/runner/go/pkg/mod
key: go-mod-build
- uses: goreleaser/goreleaser-action@v1
with:
args: release --snapshot --skip-sign
- name: Test & Publish Code Coverage
uses: paambaati/codeclimate-action@v2.6.0
env:
CC_TEST_REPORTER_ID: 38a41dde51e26878e774848c2654bba1082ad39703571505e877575b2a9695e3
with:
coverageCommand: make test
prefix: ${{ github.event.repository.name }}
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Release

on:
push:
tags:
- "*"

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-go@v2-beta
with:
go-version: '^1.14.2'
- uses: actions/cache@v1
with:
path: /home/runner/go/pkg/mod
key: go-mod-release
- name: Login to Docker hub
run: docker login -u ${{ secrets.DOCKER_HUB_USER }} -p ${{ secrets.DOCKER_HUB_PASSWORD }}
- uses: goreleaser/goreleaser-action@v1
with:
args: release
key: ${{ secrets.SIGNING_KEY }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@

# Output of the go coverage tool, specifically when used with LiteIDE
*.out
*.cover
/coverage

# Dependency directories (remove the comment below to include it)
# vendor/

# IDEs
/.idea
/.vscode

# Binaries and dists
/fronius-exporter
/dist
5 changes: 5 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": [
"config:base"
]
}

0 comments on commit 20118e4

Please sign in to comment.