-
Notifications
You must be signed in to change notification settings - Fork 8
80 lines (77 loc) · 1.98 KB
/
build.yml
File metadata and controls
80 lines (77 loc) · 1.98 KB
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
# SPDX-FileCopyrightText: © 2025 OpenCHAMI a Series of LF Projects, LLC
#
# SPDX-License-Identifier: MIT
name: Build
on:
push:
branches:
- main
pull_request:
permissions:
contents: write
jobs:
build-goreleaser:
runs-on: ubuntu-latest
steps:
- name: Install scdoc for man page generation
run: |
sudo apt update
sudo apt install scdoc
- name: Set up latest stable Go
uses: actions/setup-go@v6
with:
go-version: stable
- name: Checkout repo
uses: actions/checkout@v6
with:
fetch-tags: 1
fetch-depth: 0
- name: Set build environment variables
run: |
echo GOVERSION=$(go env GOVERSION) >> $GITHUB_ENV
echo BUILD_HOST=$(hostname) >> $GITHUB_ENV
echo BUILD_USER=$(whoami) >> $GITHUB_ENV
- name: Build with goreleaser
uses: goreleaser/goreleaser-action@v6
with:
version: '~> v2'
args: release --snapshot --clean --skip publish
id: goreleaser
build-make:
runs-on: ubuntu-latest
steps:
- name: Install build dependencies
run: |
sudo apt update
sudo apt install -y make git
- name: Set up latest stable Go
uses: actions/setup-go@v6
with:
go-version: stable
- name: Checkout repo
uses: actions/checkout@v6
with:
fetch-tags: 1
fetch-depth: 0
- name: Build manual pages
run: |
make
docs-make:
runs-on: ubuntu-latest
steps:
- name: Install build dependencies
run: |
sudo apt update
sudo apt install -y make git scdoc
- name: Set up latest stable Go
uses: actions/setup-go@v6
with:
go-version: stable
- name: Checkout repo
uses: actions/checkout@v6
with:
fetch-tags: 1
fetch-depth: 0
- name: Build manual pages
run: |
make man