Skip to content

Commit

Permalink
ci: publish AUR from sources (#895)
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez authored Dec 20, 2024
1 parent 72c70bb commit 07a1f88
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ archives:
- completions/*
- manpages/*
source:
enabled: true
name_template: '{{ .ProjectName }}_{{ .Version }}_source'

brews:
- repository:
owner: goreleaser
Expand Down Expand Up @@ -221,6 +225,46 @@ aurs:
# man pages
install -Dm644 "./manpages/nfpm.1.gz" "${pkgdir}/usr/share/man/man1/nfpm.1.gz"
aur_sources:
- homepage: https://nfpm.goreleaser.com
description: nFPM is a simple, 0-dependencies, deb, rpm and apk packager.
maintainers:
- "Fernandez Ludovic <lfernandez dot dev at gmail dot com>"
- "Carlos Alexandro Becker <carlos at becker dot software>"
license: MIT
private_key: "{{ .Env.AUR_KEY }}"
git_url: "ssh://[email protected]/nfpm.git"
build: |-
cd "${pkgname}-${pkgver}"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
go build -ldflags="-w -s -buildid='' -linkmode=external -X main.version=v${pkgver}" ./cmd/nfpm
ls -alF
chmod +x "./${pkgname}"
package: |-
cd "${pkgname}-${pkgver}"
ls -alF
# Bin
install -Dsm755 "./${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
# License
install -Dm644 "./LICENSE.md" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
# Completions
mkdir -p "${pkgdir}/usr/share/bash-completion/completions/"
mkdir -p "${pkgdir}/usr/share/zsh/site-functions/"
mkdir -p "${pkgdir}/usr/share/fish/vendor_completions.d/"
./${pkgname} completion bash > "${pkgdir}/usr/share/bash-completion/completions/${pkgname}"
./${pkgname} completion zsh > "${pkgdir}/usr/share/zsh/site-functions/_${pkgname}"
./${pkgname} completion fish > "${pkgdir}/usr/share/fish/vendor_completions.d/${pkgname}.fish"
furies:
- account: goreleaser

Expand Down

0 comments on commit 07a1f88

Please sign in to comment.