Skip to content

Commit

Permalink
Add Github Actions CI/CD workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ccremer committed May 4, 2020
1 parent a025f54 commit 2eb5ddd
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
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.1'
- uses: actions/cache@v1
with:
path: /home/runner/go/pkg/mod
key: go-mod
- uses: goreleaser/goreleaser-action@v1
with:
args: release --snapshot --skip-sign
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.1'
- uses: actions/cache@v1
with:
path: /home/runner/go/pkg/mod
key: go-mod
- 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 }}

0 comments on commit 2eb5ddd

Please sign in to comment.