-
Notifications
You must be signed in to change notification settings - Fork 1
80 lines (71 loc) · 1.93 KB
/
default.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
name: Build
env:
COVERPROFILE: ./profile.cov
strategy:
fail-fast: false
matrix:
go-version: [1.21.x, 1.22.x]
os: [ubuntu-latest, windows-latest, macos-latest]
# Run coverage only on Ubuntu with Go 1.22.x
include:
- os: ubuntu-latest
go-version: 1.22.x
coverage: true
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Build
run: make build
- name: Run tests
run: make test
- name: Run coverage
if: ${{ matrix.coverage }}
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: ${{ env.COVERPROFILE }}
license-scan:
name: License Scan
runs-on: ubuntu-latest
needs: [build]
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v4
- name: Install FOSSA
run: |
curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash
- name: Run FOSSA analysis
env:
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}
run: fossa analyze
- name: Check FOSSA status
env:
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}
run: fossa test
semantic-release:
name: Semantic Release
needs: [license-scan]
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
steps:
- uses: actions/checkout@v4
- name: Run semantic-release
if: github.event_name == 'push'
run: |
yarn global add semantic-release@17
semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}