Skip to content

Commit

Permalink
goreleaser: fix termux
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed May 5, 2024
1 parent 8f1c133 commit f5b7ea4
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 1 deletion.
25 changes: 25 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,31 @@ jobs:
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
GORELEASER_GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}

build-termux:
runs-on: termux/termux-docker
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: shallow clone
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
if: startsWith(github.ref, 'refs/tags/')
with:
distribution: nightly # TODO revert to default when #4812 is released
version: latest
args: --config .goreleaser-termux.yml release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AUR_KEY: ${{ secrets.AUR_KEY }}
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
GORELEASER_GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}

doc:
runs-on: ubuntu-latest
container: ghcr.io/carapace-sh/carapace
Expand Down
34 changes: 34 additions & 0 deletions .goreleaser-termux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
before:
hooks:
- go mod download
- go generate ./cmd/...
builds:
- env:
- CGO_ENABLED=0
goos:
- android
goarch:
- arm64
main: ./cmd/carapace
binary: carapace
tags:
- release

archives:
- name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'

checksum:
name_template: 'checksums-termux.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
disable: true

nfpms:
-
description: "multi-shell multi-command argument completer"
homepage: "https://github.com/carapace-sh/carapace-bin"
license: "MIT"
maintainer: rsteube <rsteube@users.noreply.github.com>
formats:
- termux.deb
1 change: 0 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ nfpms:
- apk
- deb
- rpm
- termux.deb

publishers:
- name: fury
Expand Down

0 comments on commit f5b7ea4

Please sign in to comment.