Skip to content

Commit 9deb58c

Browse files
authored
ci: Add aur support (#4)
1 parent 34b5b5f commit 9deb58c

File tree

3 files changed

+47
-36
lines changed

3 files changed

+47
-36
lines changed

.github/workflows/release.yml

+16-21
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,36 @@
1-
name: goreleaser
2-
1+
name: release
32
on:
43
push:
5-
# run only against tags
64
tags:
7-
- '*'
8-
5+
- "v*"
96
permissions:
107
contents: write
11-
# packages: write
12-
# issues: write
13-
148
jobs:
15-
goreleaser:
9+
release:
1610
runs-on: ubuntu-latest
1711
steps:
18-
- uses: actions/checkout@v3
12+
- name: Checkout
13+
uses: actions/checkout@v4
1914
with:
2015
fetch-depth: 0
21-
- run: git fetch --force --tags
22-
- uses: actions/setup-go@v4
16+
17+
- name: Set up Go
18+
uses: actions/setup-go@v4
2319
with:
24-
go-version: stable
25-
# More assembly might be required: Docker logins, GPG, etc. It all depends
26-
# on your needs.
27-
- name: Run test
20+
go-version: '1.22'
21+
22+
- name: Test
2823
run: make test
29-
- uses: goreleaser/goreleaser-action@v4
24+
25+
- name: Run GoReleaser
26+
uses: goreleaser/goreleaser-action@v5
3027
with:
31-
# either 'goreleaser' (default) or 'goreleaser-pro':
3228
distribution: goreleaser
3329
version: latest
3430
args: release --clean
3531
env:
3632
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3733
# needed by homebrew
3834
TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }}
39-
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro'
40-
# distribution:
41-
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
35+
# AUR
36+
AUR_KEY: ${{ secrets.AUR_KEY }}

.goreleaser.yaml

+22-14
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# This is an example .goreleaser.yml file with some sensible defaults.
2-
# Make sure to check the documentation at https://goreleaser.com
1+
version: 1
2+
33
before:
44
hooks:
5-
# You may remove this if you don't use go modules.
65
- go mod tidy
6+
77
builds:
88
- env:
99
- CGO_ENABLED=0
@@ -17,24 +17,25 @@ builds:
1717

1818
archives:
1919
- format: tar.gz
20-
# this name template makes the OS and Arch compatible with the results of uname.
20+
# this name template makes the OS and Arch compatible with the results of `uname`.
2121
name_template: >-
2222
{{ .ProjectName }}_
2323
{{- title .Os }}_
2424
{{- if eq .Arch "amd64" }}x86_64
2525
{{- else if eq .Arch "386" }}i386
2626
{{- else }}{{ .Arch }}{{ end }}
2727
{{- if .Arm }}v{{ .Arm }}{{ end }}
28-
checksum:
29-
name_template: 'checksums.txt'
30-
snapshot:
31-
name_template: "{{ incpatch .Version }}-next"
28+
# Only include binary in archive
29+
files:
30+
- none*
31+
3232
changelog:
3333
sort: asc
3434
filters:
3535
exclude:
36-
- '^docs:'
37-
- '^test:'
36+
- "^docs:"
37+
- "^test:"
38+
3839
brews:
3940
- repository:
4041
owner: umlx5h
@@ -44,7 +45,14 @@ brews:
4445
description: "Automatically generate zsh completions from man page"
4546
license: "MIT"
4647

47-
# The lines beneath this are called `modelines`. See `:help modeline`
48-
# Feel free to remove those if you don't want/use them.
49-
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
50-
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
48+
aurs:
49+
-
50+
name: zsh-manpage-completion-generator-bin
51+
homepage: "https://github.com/umlx5h/zsh-manpage-completion-generator"
52+
description: "Automatically generate zsh completions from man page"
53+
license: "MIT"
54+
private_key: '{{ .Env.AUR_KEY }}'
55+
git_url: 'ssh://aur@aur.archlinux.org/zsh-manpage-completion-generator-bin.git'
56+
package: |-
57+
# bin
58+
install -Dm755 "./zsh-manpage-completion-generator" "${pkgdir}/usr/bin/zsh-manpage-completion-generator"

README.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Download the binary from [GitHub Releases](https://github.com/umlx5h/zsh-manpage
3838
Install the latest binary to `/usr/local/bin`:
3939

4040
```bash
41-
curl -L "https://github.com/umlx5h/zsh-manpage-completion-generator/releases/latest/download/zsh-manpage-completion-generator_$(uname -s)_$(uname -m).tar.gz" | tar xz zsh-manpage-completion-generator
41+
curl -L "https://github.com/umlx5h/zsh-manpage-completion-generator/releases/latest/download/zsh-manpage-completion-generator_$(uname -s)_$(uname -m).tar.gz" | tar xz
4242
chmod a+x ./zsh-manpage-completion-generator
4343
sudo mv ./zsh-manpage-completion-generator /usr/local/bin/zsh-manpage-completion-generator
4444
```
@@ -49,6 +49,14 @@ sudo mv ./zsh-manpage-completion-generator /usr/local/bin/zsh-manpage-completion
4949
brew install umlx5h/tap/zsh-manpage-completion-generator
5050
```
5151

52+
**AUR (Arch User Repository):**
53+
54+
with any AUR helpers
55+
```
56+
yay -S zsh-manpage-completion-generator-bin
57+
paru -S zsh-manpage-completion-generator-bin
58+
```
59+
5260
**Go install:**
5361

5462
```bash

0 commit comments

Comments
 (0)