chore(release): 更新项目与 CLI 名称为 hose-use,升级到 v0.2.0,增加二进制构建与 GitHub Actions Release 工作流,集成 Agent Skill
🚀 Release / 🚀 Build & Publish Multi-Platform Binaries (push) Has been cancelled

This commit is contained in:
gitea committed 2026-08-27 11:09:18 +08:00
1 parent b7a3bf2c03
commit dbeb422aeb
13 files changed
+653 -37

No files matched your search

+56
View File
@@ -0,0 +1,56 @@
name: 🚀 Release
on:
push:
tags:
- "v*"
workflow_dispatch:
permissions:
contents: write
jobs:
build-and-publish:
name: 🚀 Build & Publish Multi-Platform Binaries
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Type-check
run: bun run check
- name: Compile multi-target binaries
run: |
mkdir -p dist/bin
node scripts/build-binary.mjs --all
- name: Package release archives
run: |
sudo apt-get update && sudo apt-get install -y zip
cd dist/bin
tar -czf hose-use-linux-x64.tar.gz hose-use-linux-x64
tar -czf hose-use-linux-arm64.tar.gz hose-use-linux-arm64
tar -czf hose-use-darwin-x64.tar.gz hose-use-darwin-x64
tar -czf hose-use-darwin-arm64.tar.gz hose-use-darwin-arm64
zip -q hose-use-windows-x64.zip hose-use-windows-x64.exe
- name: Publish GitHub Release
env:
GH_TOKEN: ${{ github.token }}
run: |
TAG_MSG=$(git tag -l --format='%(contents)' "${GITHUB_REF_NAME}" | sed '/^$/d')
if [ -n "$TAG_MSG" ]; then
gh release view "${GITHUB_REF_NAME}" --repo "${GITHUB_REPOSITORY}" >/dev/null 2>&1 || gh release create "${GITHUB_REF_NAME}" --repo "${GITHUB_REPOSITORY}" --title "${GITHUB_REF_NAME}" --notes "$TAG_MSG" --generate-notes
else
gh release view "${GITHUB_REF_NAME}" --repo "${GITHUB_REPOSITORY}" >/dev/null 2>&1 || gh release create "${GITHUB_REF_NAME}" --repo "${GITHUB_REPOSITORY}" --title "${GITHUB_REF_NAME}" --generate-notes
fi
gh release upload "${GITHUB_REF_NAME}" dist/bin/hose-use-* --repo "${GITHUB_REPOSITORY}" --clobber