-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (66 loc) · 1.84 KB
/
verify.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
name: Verify & Release
on:
pull_request:
types:
- opened
- synchronize
- edited
- closed
push:
branches:
- '*'
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
env:
GOPROXY: https://proxy.golang.org
permissions:
contents: write
packages: read
statuses: write
pull-requests: write
jobs:
verify_quality:
name: Verify Code Quality
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: v1.56.2
working-directory: ./
only-new-issues: false
args: --concurrency=16 --timeout=5m --out-format=github-actions --issues-exit-code=1
skip-cache: false
skip-pkg-cache: true
verify_functionality:
name: Verify Code Functionality
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Verify functionality
run: go test -v ./...
publish_release:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
needs:
- verify_quality
- verify_functionality
runs-on: ubuntu-latest
steps:
- name: Set version env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- uses: release-drafter/release-drafter@v6
with:
disable-autolabeler: true
name: ${{ env.RELEASE_VERSION }}
tag: ${{ env.RELEASE_VERSION }}
version: ${{ env.RELEASE_VERSION }}
publish: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}