build(release): move Android bundle publishing into GoReleaser

- build the Android universal bundle from GoReleaser hooks
- attach the bundle as a release asset
- remove the separate post-release upload step
- simplify Make targets around cross-platform builds
This commit is contained in:
wenjie 2026-04-13 11:52:35 +08:00
parent ea2107e8a9
commit d73a0e89b4
15 changed files with 18 additions and 102 deletions

View file

@ -26,5 +26,5 @@ jobs:
- name: Setup pnpm
run: corepack enable && corepack install
- name: Build
- name: Build core binaries
run: make build-all

View file

@ -77,6 +77,9 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Install zip
run: sudo apt-get install -y zip
- name: Create local tag for GoReleaser
run: git tag "${{ steps.version.outputs.version }}"
@ -92,6 +95,7 @@ jobs:
DOCKERHUB_IMAGE_NAME: ${{ vars.DOCKERHUB_REPOSITORY }}
GOVERSION: ${{ steps.setup-go.outputs.go-version }}
GORELEASER_CURRENT_TAG: ${{ steps.version.outputs.version }}
INCLUDE_ANDROID_BUNDLE: "true"
NIGHTLY_BUILD: "true"
MACOS_SIGN_P12: ${{ secrets.MACOS_SIGN_P12 }}
MACOS_SIGN_PASSWORD: ${{ secrets.MACOS_SIGN_PASSWORD }}
@ -99,11 +103,6 @@ jobs:
MACOS_NOTARY_KEY_ID: ${{ secrets.MACOS_NOTARY_KEY_ID }}
MACOS_NOTARY_KEY: ${{ secrets.MACOS_NOTARY_KEY }}
- name: Build release-only artifacts
run: |
sudo apt-get install -y zip
make build-release-artifacts
- name: Update nightly release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View file

@ -95,6 +95,9 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Install zip
run: sudo apt-get install -y zip
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v7
with:
@ -106,23 +109,13 @@ jobs:
GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }}
DOCKERHUB_IMAGE_NAME: ${{ vars.DOCKERHUB_REPOSITORY }}
GOVERSION: ${{ steps.setup-go.outputs.go-version }}
INCLUDE_ANDROID_BUNDLE: "true"
MACOS_SIGN_P12: ${{ secrets.MACOS_SIGN_P12 }}
MACOS_SIGN_PASSWORD: ${{ secrets.MACOS_SIGN_PASSWORD }}
MACOS_NOTARY_ISSUER_ID: ${{ secrets.MACOS_NOTARY_ISSUER_ID }}
MACOS_NOTARY_KEY_ID: ${{ secrets.MACOS_NOTARY_KEY_ID }}
MACOS_NOTARY_KEY: ${{ secrets.MACOS_NOTARY_KEY }}
- name: Build and upload release-only artifacts
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
sudo apt-get install -y zip
make build-release-artifacts
gh release upload "${{ inputs.tag }}" \
build/picoclaw-android-universal.zip \
--clobber
- name: Apply release flags
shell: bash
env:

View file

@ -12,6 +12,7 @@ before:
- go generate ./...
- sh -c 'cd web/frontend && CI=true pnpm install --frozen-lockfile && pnpm build:backend'
- sh -c 'GOBIN="$(go env GOPATH)/bin"; mkdir -p "$GOBIN"; go install github.com/tc-hib/go-winres@v0.3.3 && "$GOBIN/go-winres" make --in web/backend/winres/winres.json --out web/backend/rsrc --product-version={{ .Version }} --file-version={{ .Version }}'
- sh -c 'if [ "${INCLUDE_ANDROID_BUNDLE:-}" = "true" ]; then make build-android-bundle; fi'
builds:
- id: picoclaw
@ -251,6 +252,8 @@ changelog:
release:
disable: '{{ isEnvSet "NIGHTLY_BUILD" }}'
extra_files:
- glob: ./build/picoclaw-android-universal.zip
footer: >-
---

View file

@ -1,4 +1,4 @@
.PHONY: all build install uninstall clean help test build-core-all build-release-artifacts
.PHONY: all build install uninstall clean help test build-all
# Build variables
BINARY_NAME=picoclaw
@ -242,8 +242,8 @@ build-android-bundle: generate
build-pi-zero: build-linux-arm build-linux-arm64
@echo "Pi Zero 2 W builds: $(BUILD_DIR)/$(BINARY_NAME)-linux-arm (32-bit), $(BUILD_DIR)/$(BINARY_NAME)-linux-arm64 (64-bit)"
## build-core-all: Build the picoclaw core binary for all Makefile-managed platforms
build-core-all: generate
## build-all: Build the picoclaw core binary for all Makefile-managed platforms
build-all: generate
@echo "Building for multiple platforms..."
@mkdir -p $(BUILD_DIR)
GOOS=linux GOARCH=amd64 $(GO) build $(GOFLAGS) -ldflags "$(LDFLAGS)" -o $(BUILD_DIR)/$(BINARY_NAME)-linux-amd64 ./$(CMD_DIR)
@ -261,13 +261,6 @@ build-core-all: generate
GOOS=netbsd GOARCH=arm64 $(GO) build $(GOFLAGS) -ldflags "$(LDFLAGS)" -o $(BUILD_DIR)/$(BINARY_NAME)-netbsd-arm64 ./$(CMD_DIR)
@echo "Core builds complete"
## build-all: Build the picoclaw core binary for all Makefile-managed platforms
build-all: build-core-all
## build-release-artifacts: Build release-only artifacts that sit outside GoReleaser
build-release-artifacts: build-android-bundle
@echo "Release artifact builds complete"
## install: Install picoclaw to system and copy builtin skills
install: build
@echo "Installing $(BINARY_NAME)..."

View file

@ -190,9 +190,6 @@ make build-launcher
# Compiler les binaires core pour toutes les plateformes gérées par le Makefile
make build-all
# Compiler les artefacts de release empaquetés séparément des sorties principales de GoReleaser
make build-release-artifacts
# Compiler pour Raspberry Pi Zero 2 W (32 bits : make build-linux-arm ; 64 bits : make build-linux-arm64)
make build-pi-zero
@ -200,10 +197,6 @@ make build-pi-zero
make install
```
`make build-all` compile les binaires core de `picoclaw` pour toutes les plateformes gérées par le Makefile.
`make build-release-artifacts` compile les artefacts de release empaquetés séparément des sorties principales de GoReleaser.
**Raspberry Pi Zero 2 W :** Utilisez le binaire correspondant à votre OS : Raspberry Pi OS 32 bits -> `make build-linux-arm` ; 64 bits -> `make build-linux-arm64`. Ou exécutez `make build-pi-zero` pour compiler les deux.
## 🚀 Guide de démarrage rapide
@ -635,4 +628,3 @@ Discord : <https://discord.gg/V4sAZ9XWpN>
WeChat :
<img src="assets/wechat.png" alt="WeChat group QR code" width="512">

View file

@ -187,9 +187,6 @@ make build-launcher
# Build binary inti untuk semua platform yang dikelola Makefile
make build-all
# Build artefak rilis yang dikemas terpisah dari output utama GoReleaser
make build-release-artifacts
# Build untuk Raspberry Pi Zero 2 W (32-bit: make build-linux-arm; 64-bit: make build-linux-arm64)
make build-pi-zero
@ -197,10 +194,6 @@ make build-pi-zero
make install
```
`make build-all` membangun binary inti `picoclaw` untuk semua platform yang dikelola Makefile.
`make build-release-artifacts` membangun artefak rilis yang dikemas terpisah dari output utama GoReleaser.
**Raspberry Pi Zero 2 W:** Gunakan binary yang sesuai dengan OS Anda: Raspberry Pi OS 32-bit -> `make build-linux-arm`; 64-bit -> `make build-linux-arm64`. Atau jalankan `make build-pi-zero` untuk build keduanya.
## 🚀 Panduan Memulai Cepat

View file

@ -187,9 +187,6 @@ make build-launcher
# Compila i binari core per tutte le piattaforme gestite dal Makefile
make build-all
# Compila gli artefatti di release impacchettati separatamente dagli output principali di GoReleaser
make build-release-artifacts
# Compila per Raspberry Pi Zero 2 W (32-bit: make build-linux-arm; 64-bit: make build-linux-arm64)
make build-pi-zero
@ -197,10 +194,6 @@ make build-pi-zero
make install
```
`make build-all` compila i binari core di `picoclaw` per tutte le piattaforme gestite dal Makefile.
`make build-release-artifacts` compila gli artefatti di release impacchettati separatamente dagli output principali di GoReleaser.
**Raspberry Pi Zero 2 W:** Usa il binario che corrisponde al tuo OS: Raspberry Pi OS 32-bit -> `make build-linux-arm`; 64-bit -> `make build-linux-arm64`. Oppure esegui `make build-pi-zero` per compilare entrambi.
## 🚀 Guida Rapida

View file

@ -187,9 +187,6 @@ make build-launcher
# Makefile が管理するすべてのプラットフォーム向けにコアバイナリをビルド
make build-all
# メインの GoReleaser 出力とは別にパッケージ化されるリリース専用成果物をビルド
make build-release-artifacts
# Raspberry Pi Zero 2 W 向けビルド32-bit: make build-linux-arm; 64-bit: make build-linux-arm64
make build-pi-zero
@ -197,10 +194,6 @@ make build-pi-zero
make install
```
`make build-all` は、Makefile が管理するすべてのプラットフォーム向けにコアの `picoclaw` バイナリをビルドします。
`make build-release-artifacts` は、メインの GoReleaser 出力とは別にパッケージ化されるリリース専用成果物をビルドします。
**Raspberry Pi Zero 2 W:** OS に合ったバイナリを使用してください32-bit Raspberry Pi OS → `make build-linux-arm`、64-bit → `make build-linux-arm64`。または `make build-pi-zero` で両方をビルド。
## 🚀 クイックスタートガイド

View file

@ -187,9 +187,6 @@ make build-launcher
# Makefile이 관리하는 모든 플랫폼용 코어 바이너리 빌드
make build-all
# 메인 GoReleaser 출력과 별도로 패키징되는 릴리스 전용 산출물 빌드
make build-release-artifacts
# Raspberry Pi Zero 2 W용 빌드 (32비트: make build-linux-arm, 64비트: make build-linux-arm64)
make build-pi-zero
@ -197,10 +194,6 @@ make build-pi-zero
make install
```
`make build-all`은 Makefile이 관리하는 모든 플랫폼용 핵심 `picoclaw` 바이너리를 빌드합니다.
`make build-release-artifacts`는 메인 GoReleaser 출력과 별도로 패키징되는 릴리스 전용 산출물을 빌드합니다.
**Raspberry Pi Zero 2 W:** OS에 맞는 바이너리를 사용하세요. 32비트 Raspberry Pi OS는 `make build-linux-arm`, 64비트는 `make build-linux-arm64`입니다. 또는 `make build-pi-zero`로 둘 다 빌드할 수 있습니다.
## 🚀 빠른 시작 가이드

View file

@ -187,9 +187,6 @@ make build-launcher
# Build core binaries for all Makefile-managed platforms
make build-all
# Build release-only artifacts packaged separately from the main GoReleaser outputs
make build-release-artifacts
# Build for Raspberry Pi Zero 2 W
# 32-bit: make build-linux-arm
# 64-bit: make build-linux-arm64
@ -199,10 +196,6 @@ make build-pi-zero
make install
```
`make build-all` builds the core `picoclaw` binaries for all Makefile-managed platforms.
`make build-release-artifacts` builds release-only artifacts that are packaged separately from the main GoReleaser outputs.
**Raspberry Pi Zero 2 W:** Use the binary that matches your OS: 32-bit Raspberry Pi OS -> `make build-linux-arm`; 64-bit -> `make build-linux-arm64`. Or run `make build-pi-zero` to build both.
## 🚀 Quick Start Guide
@ -232,7 +225,7 @@ picoclaw-launcher
<img src="assets/launcher-webui.jpg" alt="WebUI Launcher" width="600">
</p>
**Getting started:**
**Getting started:**
Open the WebUI, then: **1)** Configure a Provider (add your LLM API key) -> **2)** Configure a Channel (e.g., Telegram) -> **3)** Start the Gateway -> **4)** Chat!
@ -310,7 +303,7 @@ picoclaw-launcher-tui
<img src="assets/launcher-tui.jpg" alt="TUI Launcher" width="600">
</p>
**Getting started:**
**Getting started:**
Use the TUI menus to: **1)** Configure a Provider -> **2)** Configure a Channel -> **3)** Start the Gateway -> **4)** Chat!
@ -385,7 +378,7 @@ This creates `~/.picoclaw/config.json` and the workspace directory.
```
> See `config/config.example.json` in the repo for a complete configuration template with all available options.
>
>
> Please note: config.example.json format is version 0, with sensitive codes in it, and will be auto migrated to version 1+, then, the config.json will only store insensitive data, the sensitive codes will be stored in .security.yml, if you need manually modify the codes, please see `docs/security_configuration.md` for more details.

View file

@ -187,9 +187,6 @@ make build-launcher
# Bina binari teras untuk semua platform yang diuruskan oleh Makefile
make build-all
# Bina artifak keluaran yang dibungkus berasingan daripada output utama GoReleaser
make build-release-artifacts
# Bina untuk Raspberry Pi Zero 2 W (32-bit: make build-linux-arm; 64-bit: make build-linux-arm64)
make build-pi-zero
@ -197,10 +194,6 @@ make build-pi-zero
make install
```
`make build-all` membina binari teras `picoclaw` untuk semua platform yang diuruskan oleh Makefile.
`make build-release-artifacts` membina artifak keluaran yang dibungkus berasingan daripada output utama GoReleaser.
**Raspberry Pi Zero 2 W:** Gunakan binari yang sepadan dengan OS anda: Raspberry Pi OS 32-bit -> `make build-linux-arm`; 64-bit -> `make build-linux-arm64`. Atau jalankan `make build-pi-zero` untuk membina kedua-duanya.
## 🚀 Panduan Permulaan Pantas

View file

@ -187,9 +187,6 @@ make build-launcher
# Compilar os binários core para todas as plataformas gerenciadas pelo Makefile
make build-all
# Compilar os artefatos de release empacotados separadamente das saídas principais do GoReleaser
make build-release-artifacts
# Compilar para Raspberry Pi Zero 2 W (32-bit: make build-linux-arm; 64-bit: make build-linux-arm64)
make build-pi-zero
@ -197,10 +194,6 @@ make build-pi-zero
make install
```
`make build-all` compila os binários core do `picoclaw` para todas as plataformas gerenciadas pelo Makefile.
`make build-release-artifacts` compila os artefatos de release empacotados separadamente das saídas principais do GoReleaser.
**Raspberry Pi Zero 2 W:** Use o binário que corresponde ao seu SO: Raspberry Pi OS 32-bit -> `make build-linux-arm`; 64-bit -> `make build-linux-arm64`. Ou execute `make build-pi-zero` para compilar ambos.
## 🚀 Guia de Início Rápido

View file

@ -187,9 +187,6 @@ make build-launcher
# Build các binary lõi cho mọi nền tảng do Makefile quản lý
make build-all
# Build các release artifact được đóng gói tách biệt với các đầu ra chính của GoReleaser
make build-release-artifacts
# Build for Raspberry Pi Zero 2 W (32-bit: make build-linux-arm; 64-bit: make build-linux-arm64)
make build-pi-zero
@ -197,10 +194,6 @@ make build-pi-zero
make install
```
`make build-all` build các binary lõi `picoclaw` cho mọi nền tảng do Makefile quản lý.
`make build-release-artifacts` build các release artifact được đóng gói tách biệt với các đầu ra chính của GoReleaser.
**Raspberry Pi Zero 2 W:** Sử dụng binary phù hợp với hệ điều hành của bạn: Raspberry Pi OS 32-bit -> `make build-linux-arm`; 64-bit -> `make build-linux-arm64`. Hoặc chạy `make build-pi-zero` để xây dựng cả hai.
## 🚀 Hướng dẫn Khởi động Nhanh

View file

@ -187,9 +187,6 @@ make build-launcher
# 为 Makefile 管理的所有平台构建核心二进制文件
make build-all
# 构建独立于主 GoReleaser 输出之外的发布附加产物
make build-release-artifacts
# 为 Raspberry Pi Zero 2 W 构建32位: make build-linux-arm; 64位: make build-linux-arm64
make build-pi-zero
@ -197,10 +194,6 @@ make build-pi-zero
make install
```
`make build-all` 会为所有由 Makefile 管理的平台构建核心 `picoclaw` 二进制文件。
`make build-release-artifacts` 会构建独立于主 GoReleaser 输出之外打包的发布附加产物。
**Raspberry Pi Zero 2 W:** 请使用与系统匹配的二进制文件32 位 Raspberry Pi OS → `make build-linux-arm`64 位 → `make build-linux-arm64`。或运行 `make build-pi-zero` 同时构建两者。
## 🚀 快速开始
@ -633,4 +626,3 @@ WeChat:
<img src="assets/wechat.png" alt="WeChat group QR code" width="512">