Skip to content

Commit 2eb5ddd

Browse files
committed
Add Github Actions CI/CD workflows
1 parent a025f54 commit 2eb5ddd

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

.github/workflows/build.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- "*"
7+
tags-ignore:
8+
- "*"
9+
pull_request:
10+
types: [opened, reopened]
11+
12+
jobs:
13+
goreleaser:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v1
17+
- uses: actions/setup-go@v2-beta
18+
with:
19+
go-version: '^1.14.1'
20+
- uses: actions/cache@v1
21+
with:
22+
path: /home/runner/go/pkg/mod
23+
key: go-mod
24+
- uses: goreleaser/goreleaser-action@v1
25+
with:
26+
args: release --snapshot --skip-sign

.github/workflows/release.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
8+
jobs:
9+
goreleaser:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v1
13+
- uses: actions/setup-go@v2-beta
14+
with:
15+
go-version: '^1.14.1'
16+
- uses: actions/cache@v1
17+
with:
18+
path: /home/runner/go/pkg/mod
19+
key: go-mod
20+
- name: Login to Docker hub
21+
run: docker login -u ${{ secrets.DOCKER_HUB_USER }} -p ${{ secrets.DOCKER_HUB_PASSWORD }}
22+
- uses: goreleaser/goreleaser-action@v1
23+
with:
24+
args: release
25+
key: ${{ secrets.SIGNING_KEY }}
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)