feat: add automated release workflow and configuration

- Introduced a new release configuration file to define commit types and sections for changelog generation.
- Created a publish workflow to automate the release process on main branch pushes, including version bumping, changelog generation, and GitHub release creation.
- Added a separate release workflow to build artifacts for multiple platforms and upload them as release assets.
- Documented the automated release process, including commit message conventions and local release commands in AUTOMATED_RELEASE.md.
This commit is contained in:
zhanggy committed 2025-10-29 10:24:39 +08:00
1 parent 0eb2dcf8c2
commit 18fc065a17
6 files changed
+1316 -7

No files matched your search

+60
View File
@@ -0,0 +1,60 @@
name: Release
on:
push:
branches:
- main
jobs:
release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- 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:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm build:all
env:
# 在 macOS 上禁用代码签名
CSC_IDENTITY_AUTO_DISCOVERY: false
# GitHub token 用于发布
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: release-${{ matrix.os }}
path: release/**