Skip to content

Commit

Permalink
Build deb, rpm, and homebrew packages on release
Browse files Browse the repository at this point in the history
This builds `.deb` and `.rpm` packages automatically when a new tag is pushed.

It also pushes a homebrew formula to the `hrs/homebrew-docsim` repo.
  • Loading branch information
hrs committed Jun 27, 2023
1 parent 40640c9 commit 0c5e2a3
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
dist/
docsim
65 changes: 65 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
project_name: docsim

builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64

archives:
- name_template: >-
{{ .ProjectName }}_
{{- .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
rlcp: true
format_overrides:
- goos: windows
format: zip
files:
- README.md
- LICENSE.md
- manpages/*
brews:
- folder: Formula
tap:
owner: hrs
name: homebrew-docsim
branch: main
token: "{{ .Env.GITHUB_TOKEN }}"
goarm: "7"
description: A local, in-memory search tool, ranking results by textual similarity.
homepage: https://github.com/hrs/docsim
license: GPL-3.0-or-later
test: system "make test"
install: |-
bin.install "docsim"
man1.install "manpages/docsim.1"
nfpms:
- maintainer: Harry R. Schwartz <[email protected]>
description: A local, in-memory search tool, ranking results by textual similarity.
bindir: /usr/bin
section: utils
homepage: https://github.com/hrs/docsim
license: GPLv3
contents:
- src: ./manpages/docsim.1
dst: /usr/share/man/man1/docsim.1
file_info:
mode: 0644
- src: ./LICENSE.md
dst: /usr/share/doc/docsim/copyright
file_info:
mode: 0644
formats:
- deb
- rpm
File renamed without changes.

0 comments on commit 0c5e2a3

Please sign in to comment.