-
Notifications
You must be signed in to change notification settings - Fork 5
50 lines (44 loc) · 1.01 KB
/
build.yaml
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
42
43
44
45
46
47
48
49
50
name: Build Importer
on:
push:
branches:
- main
tags:
- v*
pull_request:
branches:
- main
- release/v*
env:
GO_VERSION: 1.17.5
jobs:
build:
name: Build and Test Importer
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: ${{ env.GO_VERSION }}
- name: Run Go Build
run: go build ./...
- name: Run Go Test
run: go test ./...
- name: Run GoReleaser
if: github.event_name != 'pull_request'
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
- name: Upload Artifact
if: github.event_name != 'pull_request'
uses: actions/upload-artifact@v2
with:
name: importer
path: ./cmd/importer/dist/*