Skip to content

Commit

Permalink
re-add goreleaser for homebrew
Browse files Browse the repository at this point in the history
  • Loading branch information
bartekpacia committed Mar 10, 2024
1 parent dea6db6 commit c55710f
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 45 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,6 @@ jobs:
with:
go-version-file: go.mod

# - name: Install GoReleaser
# run: go install github.com/goreleaser/goreleaser@master

# - name: Run GoReleaser
# run: goreleaser release
# env:
# GITHUB_TOKEN: ${{ secrets.TOKEN }}
# AUR_SSH_KEY: ${{ secrets.AUR_SSH_KEY }}

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,3 @@ config.toml
# generated
/db
nohup.out

dist/
97 changes: 63 additions & 34 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ builds:

archives:
- id: fhome
name_template: 'fhome_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
name_template: "fhome_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
builds:
- fhome
files:
Expand All @@ -37,7 +37,7 @@ archives:
format: zip

- id: fhomed
name_template: 'fhomed_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
name_template: "fhomed_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
builds:
- fhomed
files:
Expand All @@ -51,38 +51,38 @@ archives:
format: zip

changelog:
skip: true
disable: true

# brews:
# - name: fhome
# ids:
# - fhome
# repository:
# owner: bartekpacia
# name: homebrew-tools
# folder: Formula
# homepage: https://github.com/bartekpacia/fhome
# description: Interact with smart home devices connected to F&Home
# license: MIT
# install: |
# bin.install "fhome"
# bash_completion.install "autocomplete/bash_autocomplete_fhome" => "fhome"
# zsh_completion.install "autocomplete/zsh_autocomplete_fhome" => "_fhome"
brews:
- name: fhome
ids:
- fhome
repository:
owner: bartekpacia
name: homebrew-tools
folder: Formula
homepage: https://github.com/bartekpacia/fhome
description: Interact with smart home devices connected to F&Home
license: MIT
install: |
bin.install "fhome"
bash_completion.install "autocomplete/bash_autocomplete_fhome" => "fhome"
zsh_completion.install "autocomplete/zsh_autocomplete_fhome" => "_fhome"
# - name: fhomed
# ids:
# - fhomed
# repository:
# owner: bartekpacia
# name: homebrew-tools
# folder: Formula
# homepage: https://github.com/bartekpacia/fhome
# description: Background daemon for F&Home
# license: MIT
# install: |
# bin.install "fhomed"
# bash_completion.install "autocomplete/bash_autocomplete_fhomed" => "fhomed"
# zsh_completion.install "autocomplete/zsh_autocomplete_fhomed" => "_fhomed"
- name: fhomed
ids:
- fhomed
repository:
owner: bartekpacia
name: homebrew-tools
folder: Formula
homepage: https://github.com/bartekpacia/fhome
description: Background daemon for F&Home
license: MIT
install: |
bin.install "fhomed"
bash_completion.install "autocomplete/bash_autocomplete_fhomed" => "fhomed"
zsh_completion.install "autocomplete/zsh_autocomplete_fhomed" => "_fhomed"
aurs:
- name: fhome-bin
Expand All @@ -92,16 +92,17 @@ aurs:
description: Interact with smart home devices connected to F&Home
maintainers:
- Bartek Pacia <[email protected]>
private_key: '{{ .Env.AUR_SSH_KEY }}'
private_key: "{{ .Env.AUR_SSH_KEY }}"
git_url: [email protected]:bartekpacia/aur.git
directory: fhome-bin
commit_msg_template: update fhome to {{ .Tag }}
package: |
cd "$pkgname-$pkgver"
# bin
install -Dm755 fhome "${pkgdir}/usr/bin/fhome"
# license
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/mybin/LICENSE"
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/fhome/LICENSE"
# completions
mkdir -p "${pkgdir}/usr/share/bash-completion/completions/"
Expand All @@ -111,3 +112,31 @@ aurs:
# man pages
# install -Dm644 "./manpages/mybin.1.gz" "${pkgdir}/usr/share/man/man1/mybin.1.gz"
- name: fhomed-bin
ids:
- fhomed
homepage: https://github.com/bartekpacia/fhome
description: Background daemon for F&Home
maintainers:
- Bartek Pacia <[email protected]>
private_key: "{{ .Env.AUR_SSH_KEY }}"
git_url: [email protected]:bartekpacia/aur.git
directory: fhomed-bin
commit_msg_template: update fhomed to {{ .Tag }}
package: |
cd "$pkgname-$pkgver"
# bin
install -Dm755 fhomed "${pkgdir}/usr/bin/fhomed"
# license
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/fhomed/LICENSE"
# completions
mkdir -p "${pkgdir}/usr/share/bash-completion/completions/"
mkdir -p "${pkgdir}/usr/share/zsh/site-functions/"
install -Dm755 autocomplete/bash_autocomplete_fhomed "${pkgdir}/usr/share/bash-completion/completions/fhomed"
install -Dm755 autocomplete/zsh_autocomplete_fhomed "${pkgdir}/usr/share/zsh/site-functions/_fhomed"
# man pages
# install -Dm644 "./manpages/mybin.1.gz" "${pkgdir}/usr/share/man/man1/mybin.1.gz"

0 comments on commit c55710f

Please sign in to comment.