This repository was archived by the owner on Nov 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (50 loc) · 1.36 KB
/
ci.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
name: build
on:
push:
branches:
- main
env:
RELEASE: 1.3.0
permissions:
contents: write
jobs:
build:
name: Build
runs-on: ubuntu-latest
env:
CGO_ENABLED: "1"
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- uses: actions/setup-go@v5
with:
go-version: 'stable'
cache: true
- run: go mod download
- run: go test -cover -coverprofile=coverage.txt -covermode=atomic ./...
- name: Set Short SHA
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
with:
version: ${{ env.RELEASE }}
- uses: actions/go-dependency-submission@v1
with:
go-mod-path: go.mod
# - name: Upload Test Results As Artifact
# uses: actions/upload-artifact@v2
# if: always()
# with:
# name: test_report
# path: test_report.html