-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (36 loc) · 920 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
name: main
on:
push:
branches: [ main ]
tags: ['*']
pull_request:
branches: [ main ]
jobs:
build:
name: Build
if: "!contains(github.event.commits[0].message, 'ci skip')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup golang
uses: actions/setup-go@v2
with:
go-version: 1.18
- name: Run tests
run: |
eval "$(ssh-agent -s)"
ssh-add - <<< "${{ secrets.DK_BLUE_INTERNAL_GO }}"
git config --global --add url."ssh://[email protected]/".insteadOf "https://github.com/"
go test -v ./...
- name: Run goreleaser
uses: goreleaser/goreleaser-action@v2
if: startsWith(github.ref, 'refs/tags/')
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}