Skip to content

feat: add linux systemd service #16

feat: add linux systemd service

feat: add linux systemd service #16

Workflow file for this run

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 }}