1
0
mirror of https://github.com/142vip/408CSFamily.git synced 2026-04-14 18:30:30 +08:00

feat: 移除eslint相关配置,引入@antfu/eslint-config,统一约束风格

This commit is contained in:
142vip.cn
2024-09-25 15:16:40 +08:00
parent e792ed40b2
commit 9303820456
134 changed files with 10220 additions and 1804 deletions

View File

@@ -1,8 +1,8 @@
## CD交付流水线
## - 部署到Github Pages
## - 部署到Vercel托管平台
## - 发布新的Github Release
## 参考资料https://v2.vuepress.vuejs.org/zh/guide/deployment.html#github-pages
# # CD交付流水线
# # - 部署到Github Pages
# # - 部署到Vercel托管平台
# # - 发布新的Github Release
# # 参考资料https://v2.vuepress.vuejs.org/zh/guide/deployment.html#github-pages
name: CD
on:
@@ -11,7 +11,7 @@ on:
- next
workflow_dispatch:
## vercel 环境变量
# # vercel 环境变量
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
@@ -23,9 +23,9 @@ permissions:
id-token: write
jobs:
## 部署到Github-Pages
# # 部署到Github-Pages
deploy-github:
name: "部署到Github-Pages"
name: 部署到Github-Pages
runs-on: ubuntu-latest
environment:
name: github-pages
@@ -72,9 +72,9 @@ jobs:
id: deployment
uses: actions/deploy-pages@v4
## 部署到vercel平台
# # 部署到vercel平台
deploy-vercel:
name: "部署到Vercel平台"
name: 部署到Vercel平台
runs-on: ubuntu-latest
if: github.repository == '142vip/408CSFamily'
@@ -86,23 +86,23 @@ jobs:
# “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录
fetch-depth: 0
## 注意: 这里的操作时间vercel平台配置的命令拉取下来执行
# # 注意: 这里的操作时间vercel平台配置的命令拉取下来执行
- name: Pull Vercel Environment Information
run: npm i -g vercel && vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
## 执行vercel平台配置的命令
# # 执行vercel平台配置的命令
- name: Build Project Artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
## dist文件同步到vercel平台
# # dist文件同步到vercel平台
- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
## 版本发布
# # 版本发布
release:
name: "Github版本发布"
name: Github版本发布
runs-on: ubuntu-latest
## 主库master、next且执行release更新时执行
# # 主库master、next且执行release更新时执行
if: github.repository == '142vip/408CSFamily' && startsWith(github.event.head_commit.message, 'chore(release):')
steps:
@@ -113,7 +113,7 @@ jobs:
# “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录
fetch-depth: 0
### 打成压缩包
# ## 打成压缩包
- name: Create Zip Package
run: |
zip -r 408CSFamily.zip . \
@@ -137,12 +137,12 @@ jobs:
release_name: v${{ steps.releaseVersion.outputs.version }}
body: |
Release ${{ steps.releaseVersion.outputs.version }}
### Features
### Bug Fixes
## 更新资源
# # 更新资源
- name: Upload Resource Assets
uses: actions/upload-release-asset@latest
env:
@@ -153,7 +153,6 @@ jobs:
asset_name: 408CSFamily.zip
asset_content_type: application/zip
# Deploy-ESC:
# name: "部署到ESC服务器"
# needs: install-init

View File

@@ -1,7 +1,7 @@
## 代码CI快速集成流水线lint、fix、build
# # 代码CI快速集成流水线lint、fix、build
name: CI
## 触发条件
# # 触发条件
on:
# 提PR到next分支触发CI
pull_request:
@@ -15,7 +15,7 @@ on:
workflow_dispatch:
schedule:
- cron: "0 0 1 * *"
- cron: '0 0 1 * *'
# 环境变量
env:
@@ -23,12 +23,11 @@ env:
REGISTRY: registry.cn-hangzhou.aliyuncs.com
UserName: 142vip
jobs:
Base-Build:
name: "基础编译构建"
name: 基础编译构建
runs-on: ubuntu-latest
## 主库且拉取PR时触发
# # 主库且拉取PR时触发
if: github.repository == '142vip/408CSFamily' && github.event_name == 'pull_request'
permissions:
actions: read
@@ -48,22 +47,22 @@ jobs:
with:
version: 9.6.0
## 安装Node环境
# # 安装Node环境
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18.18.0
## 缓存
cache: 'pnpm'
# # 缓存
cache: pnpm
## 下载依赖,并执行初始化脚本:钩子函数、思维导图构建
# # 下载依赖,并执行初始化脚本:钩子函数、思维导图构建
- name: Install Dependencies
run: |
./scripts/ci
- name: Code LintFix
run: |
./scripts/lint
pnpm lint
- name: Build Site
run: |
@@ -74,9 +73,9 @@ jobs:
pnpm build:proxy
Build-Docker-Image:
name: "构建Docker镜像"
name: 构建Docker镜像
runs-on: ubuntu-latest
## 主库且tag更新时执行
# # 主库且tag更新时执行
if: github.repository == '142vip/408CSFamily' && startsWith(github.event.head_commit.message, 'chore(release):')
permissions:
actions: read
@@ -109,14 +108,12 @@ jobs:
run: |
./scripts/ci
## 构建支持domain
# # 构建支持domain
- name: Build To Dist
run: |
./scripts/bundle build
pnpm build
## 快速构建并推送
# # 快速构建并推送
- name: Push Docker Image
run: |
./scripts/bundle image_faster
./scripts/bundle

View File

@@ -6,7 +6,7 @@ on:
branches:
- next
schedule:
- cron: "30 7 * * 3"
- cron: '30 7 * * 3'
jobs:
analyze:
@@ -33,4 +33,4 @@ jobs:
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v2