-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (46 loc) · 1.56 KB
/
release.yaml
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
name: Release
on:
push:
tags:
- "v*.*.*"
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v5
with:
go-version: ^1.23
check-latest: true
cache-dependency-path: |
**/go.sum
**/go.mod
- uses: actions/checkout@v4
- name: build matrix
run: |
make test
echo
mkdir -p etc/systemd/system
mv conf/contatto.toml etc/contatto.toml
mv .github/contatto.service etc/systemd/system/contatto.service
file_list=(bin/contatto etc/contatto.toml etc/systemd/system/contatto.service)
echo package files: ${file_list[*]}
make build GO='GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go'
tar czf contatto-linux-amd64.tar.gz ${file_list[*]}
make clean
make build GO='GOOS=linux GOARCH=arm CGO_ENABLED=0 go'
tar czf contatto-linux-arm.tar.gz ${file_list[*]}
make clean
make build GO='GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go'
tar czf contatto-linux-arm64.tar.gz ${file_list[*]}
make clean
make build GO='GOOS=linux GOARCH=mips CGO_ENABLED=0 go'
tar czf contatto-linux-mips.tar.gz ${file_list[*]}
make clean
make build GO='GOOS=linux GOARCH=mipsle CGO_ENABLED=0 go'
tar czf contatto-linux-mipsle.tar.gz ${file_list[*]}
make clean
- uses: ncipollo/release-action@v1
with:
artifacts: "*.tar.gz"
token: ${{ secrets.GITHUB_TOKEN }}