feat: 更新发布工作流,优化 Git 配置,添加文件和文件夹选择功能,调整模板列表标题

This commit is contained in:
zhanggy committed 2025-10-29 18:58:58 +08:00
1 parent c59dc5c159
commit 56acfb275b
9 files changed
+120 -122

No files matched your search

+14 -14
View File
@@ -24,17 +24,17 @@ jobs:
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Configure Git to use HTTPS instead of SSH
run: |
git config --global url."https://github.com/".insteadOf git@github.com:
git config --global url."https://".insteadOf git://
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
@@ -42,12 +42,12 @@ jobs:
run_install: |
- recursive: true
args: [--frozen-lockfile=false]
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v4
with:
@@ -55,39 +55,39 @@ jobs:
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
env:
NPM_CONFIG_LEGACY_PEER_DEPS: true
- name: Setup Git user
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Bump version and generate changelog
run: |
# 根据 commit 信息自动更新版本和生成 changelog
pnpm release
# 获取新版本号
VERSION=$(node -p "require('./package.json').version")
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Push changes
run: |
git push origin main
git push origin v${{ env.VERSION }}
- name: Build for all platforms
run: pnpm build:all
run: pnpm build:win
env:
# 在 macOS 上禁用代码签名
CSC_IDENTITY_AUTO_DISCOVERY: false
# GitHub token 用于发布
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
@@ -99,4 +99,4 @@ jobs:
files: |
release/${{ env.VERSION }}/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}