-
Notifications
You must be signed in to change notification settings - Fork 45
53 lines (53 loc) · 1.28 KB
/
dev.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
42
43
44
45
46
47
48
49
50
51
52
53
name: dev
on:
push:
branches:
- main
tags:
- 'v*.*.*'
pull_request_target:
branches:
- main
jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: Setup
uses: actions/setup-go@v2
with:
go-version: 1.13
- name: Checkout
uses: actions/[email protected]
- name: Restore Cache
uses: actions/[email protected]
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install
run: |
go get -v -t -d ./...
make deps
env:
GO111MODULE: 'on'
- name: Lint
run: PATH="$(go env GOPATH)/bin:$PATH" make lint
- name: Test
run: make cover
- name: Build
run: PATH="$(go env GOPATH)/bin:$PATH" VERSION=${GITHUB_REF} make build
env:
CI: true
- name: Sonar
uses: sonarsource/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: build/chrome-bookmarks.alfredworkflow
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}