Skip to content

Commit

Permalink
ci: add man page generation/packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
synackd committed Nov 22, 2024
1 parent 920e55f commit 4ff0fee
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install scdoc for man page generation
run: |
sudo apt update
sudo apt install scdoc
- name: Set up Go 1.21
uses: actions/setup-go@v5
with:
Expand Down
7 changes: 7 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ version: 2
before:
hooks:
- go mod tidy
- bash -c 'for src in man/*.sc; do scdoc < $src > ${src%.*}; done'

builds:
- ldflags:
Expand Down Expand Up @@ -36,6 +37,8 @@ archives:
{{- if .Arm }}v{{ .Arm }}{{ end }}
files:
- LICENSE
- man/*.1
- man/*.5

nfpms:
- id: ochami
Expand All @@ -53,6 +56,10 @@ nfpms:
contents:
- src: dist/ochami_{{ .Os }}_{{ if eq .Arch "amd64" }}{{ .Arch }}_{{ .Amd64 }}{{ else if eq .Arch "arm64" }}{{ .Arch }}_{{ .Arm64 }}{{ else }}{{ .Arch }}{{ end }}/ochami
dst: /usr/local/bin/ochami
- src: man/*.1
dst: /usr/local/share/man/man1/
- src: man/*.5
dst: /usr/local/share/man/man5/

dockers:
- dockerfile: goreleaser.dockerfile
Expand Down

0 comments on commit 4ff0fee

Please sign in to comment.