mirror of
https://github.com/142vip/408CSFamily.git
synced 2026-02-02 18:20:26 +08:00
feat(GitHub Actions): 引入@142vip/release-version模块,修改CD流水线支持自动发布流程
This commit is contained in:
56
.github/workflows/CD.yaml
vendored
56
.github/workflows/CD.yaml
vendored
@@ -116,45 +116,29 @@ jobs:
|
||||
# “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录
|
||||
fetch-depth: 0
|
||||
|
||||
# ## 打成压缩包
|
||||
- name: Create Zip Package
|
||||
run: |
|
||||
zip -r 408CSFamily.zip . \
|
||||
-x "node_modules/*" \
|
||||
-x "*.git*"
|
||||
|
||||
# 提取版本号
|
||||
- name: Get New Version Number
|
||||
id: releaseVersion
|
||||
run: |
|
||||
echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
|
||||
|
||||
# 创建发布版本
|
||||
- name: Create New Release
|
||||
id: createRelease
|
||||
uses: actions/create-release@latest
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# 安装PNPM
|
||||
- name: PNPM Install
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
tag_name: v${{ steps.releaseVersion.outputs.version }}
|
||||
release_name: v${{ steps.releaseVersion.outputs.version }}
|
||||
body: |
|
||||
Release ${{ steps.releaseVersion.outputs.version }}
|
||||
version: 9.6.0
|
||||
|
||||
### Features
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
# # 更新资源
|
||||
- name: Upload Resource Assets
|
||||
uses: actions/upload-release-asset@latest
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# 安装Node环境
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
upload_url: ${{ steps.createRelease.outputs.upload_url }}
|
||||
asset_path: ./408CSFamily.zip
|
||||
asset_name: 408CSFamily.zip
|
||||
asset_content_type: application/zip
|
||||
node-version: 20.16.0
|
||||
# 缓存
|
||||
cache: pnpm
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
./scripts/ci
|
||||
|
||||
# Github发布版本,并更新Release信息
|
||||
- name: Release New Version
|
||||
run: npx changelog
|
||||
env:
|
||||
GITHUB_TOKEN: ${{secrets.TOKEN}}
|
||||
|
||||
# Deploy-ESC:
|
||||
# name: "部署到ESC服务器"
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@142vip/fairy-cli": "0.0.3-alpha.11",
|
||||
"@142vip/release-version": "0.0.1-alpha.9",
|
||||
"@142vip/utils": "0.0.1-alpha.5",
|
||||
"@antfu/eslint-config": "^2.27.3",
|
||||
"@vuepress/client": "2.0.0-beta.67",
|
||||
|
||||
3
pnpm-lock.yaml
generated
3
pnpm-lock.yaml
generated
@@ -11,6 +11,9 @@ importers:
|
||||
'@142vip/fairy-cli':
|
||||
specifier: 0.0.3-alpha.11
|
||||
version: 0.0.3-alpha.11
|
||||
'@142vip/release-version':
|
||||
specifier: 0.0.1-alpha.9
|
||||
version: 0.0.1-alpha.9
|
||||
'@142vip/utils':
|
||||
specifier: 0.0.1-alpha.5
|
||||
version: 0.0.1-alpha.5
|
||||
|
||||
Reference in New Issue
Block a user