Skip to content

feat: refine sidebar UI and complete i18n for FolderModal (v0.3.2) #29

feat: refine sidebar UI and complete i18n for FolderModal (v0.3.2)

feat: refine sidebar UI and complete i18n for FolderModal (v0.3.2) #29

Workflow file for this run

name: Build and Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
build:
strategy:
matrix:
include:
- os: macos-latest
platform: mac
- os: windows-latest
platform: win
- os: ubuntu-latest
platform: linux
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
# 显式使用与 package.json 中一致的 pnpm 版本
version: 9.15.0
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Clean previous build artifacts
shell: bash
run: |
rm -rf dist || true
- name: Build for ${{ matrix.platform }}
run: pnpm electron:build:${{ matrix.platform }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Remove debug files
shell: bash
run: |
# 删除 builder-debug.yml
find dist -name "builder-debug.yml" -delete || true
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.platform }}-build
path: |
dist/*.dmg
dist/*.zip
dist/*-x64.exe
dist/*-arm64.exe
dist/*.AppImage
dist/*.deb
dist/*.blockmap
dist/latest*.yml
if-no-files-found: ignore
release:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
permissions:
contents: write
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: artifacts/**/*
draft: false
prerelease: ${{ contains(github.ref, 'beta') || contains(github.ref, 'alpha') }}
generate_release_notes: true
body: |
## 📦 下载安装
| 平台 | 芯片 | 下载文件示例 |
|------|------|--------------|
| macOS | Intel 芯片 | `PromptHub-x.x.x-x64.dmg` |
| macOS | M 系列芯片 | `PromptHub-x.x.x-arm64.dmg` |
| Windows | x64 | `PromptHub-Setup-x.x.x-x64.exe` |
| Linux | x64 | `PromptHub-x.x.x.AppImage` / `.deb` |
> 💡 实际文件名中的 `x.x.x` 会是本次发布的版本号,例如 `0.1.6`。
### ⚠️ macOS 首次启动
如果提示"无法打开"或"已损坏",请在终端执行:
```bash
sudo xattr -rd com.apple.quarantine /Applications/PromptHub.app
```
---
## 🔄 本次更新
详细更新日志请查看 [更新日志](https://github.com/legeling/PromptHub#-更新日志)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}