Skip to content

Commit

Permalink
Merge pull request #26 from yseto/goreleaser
Browse files Browse the repository at this point in the history
prepare goreleaser config.
  • Loading branch information
yseto authored Feb 26, 2023
2 parents 7faf2e8 + 4a30b07 commit 5fb381a
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.19

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16 changes: 16 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
builds:
- binary: sabatrapd
goos:
- linux
goarch:
- amd64
- arm64
archives:
- name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
files:
- systemd/*
- sabatrapd.yml.sample
release:
github:
owner: yseto
name: sabatrapd
2 changes: 1 addition & 1 deletion systemd/sabatrapd.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ After=network.target

[Service]
EnvironmentFile=-%DESTETCDIR%/sabatrapd.env
ExecStart=/usr/bin/sabatrapd %DESTETCDIR%/sabatrapd.yml
ExecStart=/usr/local/bin/sabatrapd -conf %DESTETCDIR%/sabatrapd.yml

[Install]
WantedBy=multi-user.target

0 comments on commit 5fb381a

Please sign in to comment.