-
-
Notifications
You must be signed in to change notification settings - Fork 3
73 lines (59 loc) · 1.46 KB
/
ci_main.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
name: Main CI
on:
push:
branches: ["main"]
paths:
- ".github/workflows/ci_main.yml" # this file
- "go.mod"
- "go.sum"
- "Makefile"
- "goreleaser/develop.yml"
- "generate/**/*"
- "src/**/*"
- "docker/**/*"
- ".dockerignore"
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
goreleaser:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64,arm
- name: Generate go code from go:generate comments
run: make install
- name: Snapshot release
uses: goreleaser/goreleaser-action@v6
with:
version: "~> v2"
args: release --snapshot --clean --config goreleaser/develop.yml
test:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: Generate go code from go:generate comments
run: make install
- name: Build project
run: make compile
- name: Test units
run: make test