Skip to content

Commit d15b5eb

Browse files
committed
Add release automation
1 parent 2470f4f commit d15b5eb

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

.github/workflows/release.yaml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: release
2+
on:
3+
push:
4+
tags:
5+
- 'v*'
6+
7+
jobs:
8+
release:
9+
permissions:
10+
packages: write
11+
contents: write
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
- uses: actions/setup-go@v4
18+
with:
19+
go-version: '1.22'
20+
- name: Build and release
21+
uses: goreleaser/goreleaser-action@v5
22+
with:
23+
version: latest
24+
args: release --clean
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
builds:
2+
- id: daemon
3+
binary: gopherxlr
4+
mod_timestamp: '{{ .CommitTimestamp }}'
5+
flags:
6+
- -trimpath
7+
ldflags:
8+
- -s
9+
- -w
10+
- -X main.version={{.Version}} -X main.commit={{.FullCommit}} -X main.date={{.CommitDate}}
11+
goos:
12+
- linux
13+
goarch:
14+
- amd64
15+
- arm64
16+
archives:
17+
- id: daemon
18+
builds:
19+
- daemon
20+
wrap_in_directory: true
21+
files:
22+
- LICENSE
23+
- README.md
24+
- examples/*
25+
- systemd/*

0 commit comments

Comments
 (0)