From 46493c86b3b788e9c47149fb512362a4f773a9c6 Mon Sep 17 00:00:00 2001 From: rsteube Date: Sun, 5 May 2024 21:26:58 +0200 Subject: [PATCH] goreleaser: fix termux --- .github/workflows/go.yml | 11 +++++------ .goreleaser.yml | 15 ++++++++++++++- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index ff4e2d185f..dfbf24f87f 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -8,6 +8,7 @@ jobs: build: runs-on: ubuntu-latest + container: ghcr.io/carapace-sh/go:1.22 steps: - name: shallow clone uses: actions/checkout@v4 @@ -19,11 +20,9 @@ jobs: with: fetch-depth: 0 - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: '1.21' - + - name: fix git safe.directory + run: git config --global --add safe.directory '*' + - name: Generate run: go generate ./cmd/... @@ -52,7 +51,7 @@ jobs: uses: goreleaser/goreleaser-action@v5 if: startsWith(github.ref, 'refs/tags/') with: - version: latest + version: nightly # switch back to stable when #4812 is merged args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml index 05db488560..20209e3d48 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -3,7 +3,8 @@ before: - go mod download - go generate ./cmd/... builds: - - env: + - id: default + env: - CGO_ENABLED=0 goos: - linux @@ -13,6 +14,18 @@ builds: binary: carapace tags: - release + - id: android + env: + - CGO_ENABLED=0 + goos: + - android + goarch: + - arm64 + main: ./cmd/carapace + binary: carapace + tags: + - release + gobinary: go-termux archives: - name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' format_overrides: