mirror of
https://github.com/LHY0125/PathEditor.git
synced 2026-06-29 01:45:54 +08:00
ci(deps): bump actions/checkout from 4 to 7
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 7. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v7) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
+65
-65
@@ -1,65 +1,65 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
tags-ignore:
|
||||
- '**'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
frontend:
|
||||
name: 前端检查 (格式 + 类型 + Lint + 测试 + 覆盖率)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'npm'
|
||||
|
||||
- run: npm ci
|
||||
|
||||
- name: Prettier 格式检查
|
||||
run: npx prettier --check "src/**/*.{ts,tsx}" "tests/**/*.{ts,tsx}" "e2e/**/*.ts"
|
||||
|
||||
- name: TypeScript 类型检查
|
||||
run: npx tsc -b --noEmit
|
||||
|
||||
- name: ESLint
|
||||
run: npx eslint src/ tests/ e2e/
|
||||
|
||||
- name: Vitest 测试 + 覆盖率
|
||||
run: npx vitest run --coverage
|
||||
|
||||
- name: 上传覆盖率到 Codecov
|
||||
uses: codecov/codecov-action@v5
|
||||
with:
|
||||
files: ./coverage/cobertura-coverage.xml
|
||||
flags: frontend
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
rust:
|
||||
name: Rust 检查 (格式 + Check + Clippy + Test)
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Cargo Format Check
|
||||
run: cargo fmt --check
|
||||
|
||||
- name: Cargo Check
|
||||
run: cargo check
|
||||
|
||||
- name: Cargo Clippy
|
||||
run: cargo clippy -- -D warnings
|
||||
|
||||
- name: Cargo Test
|
||||
run: cargo test
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
tags-ignore:
|
||||
- '**'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
frontend:
|
||||
name: 前端检查 (格式 + 类型 + Lint + 测试 + 覆盖率)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'npm'
|
||||
|
||||
- run: npm ci
|
||||
|
||||
- name: Prettier 格式检查
|
||||
run: npx prettier --check "src/**/*.{ts,tsx}" "tests/**/*.{ts,tsx}" "e2e/**/*.ts"
|
||||
|
||||
- name: TypeScript 类型检查
|
||||
run: npx tsc -b --noEmit
|
||||
|
||||
- name: ESLint
|
||||
run: npx eslint src/ tests/ e2e/
|
||||
|
||||
- name: Vitest 测试 + 覆盖率
|
||||
run: npx vitest run --coverage
|
||||
|
||||
- name: 上传覆盖率到 Codecov
|
||||
uses: codecov/codecov-action@v5
|
||||
with:
|
||||
files: ./coverage/cobertura-coverage.xml
|
||||
flags: frontend
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
rust:
|
||||
name: Rust 检查 (格式 + Check + Clippy + Test)
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Cargo Format Check
|
||||
run: cargo fmt --check
|
||||
|
||||
- name: Cargo Check
|
||||
run: cargo check
|
||||
|
||||
- name: Cargo Clippy
|
||||
run: cargo clippy -- -D warnings
|
||||
|
||||
- name: Cargo Test
|
||||
run: cargo test
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
build-and-release:
|
||||
name: 构建 NSIS 安装包并发布
|
||||
runs-on: windows-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'npm'
|
||||
|
||||
- run: npm ci
|
||||
|
||||
- name: Tauri Build
|
||||
run: npx tauri build
|
||||
|
||||
- name: 上传安装包到 Release
|
||||
run: |
|
||||
$installer = Get-ChildItem -Path "target\release\bundle\nsis\*.exe" | Select-Object -First 1
|
||||
if (gh release view $env:GITHUB_REF_NAME 2>$null) {
|
||||
gh release upload $env:GITHUB_REF_NAME "$installer" --clobber
|
||||
} else {
|
||||
gh release create $env:GITHUB_REF_NAME "$installer" --title "$env:GITHUB_REF_NAME" --generate-notes
|
||||
}
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
build-and-release:
|
||||
name: 构建 NSIS 安装包并发布
|
||||
runs-on: windows-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'npm'
|
||||
|
||||
- run: npm ci
|
||||
|
||||
- name: Tauri Build
|
||||
run: npx tauri build
|
||||
|
||||
- name: 上传安装包到 Release
|
||||
run: |
|
||||
$installer = Get-ChildItem -Path "target\release\bundle\nsis\*.exe" | Select-Object -First 1
|
||||
if (gh release view $env:GITHUB_REF_NAME 2>$null) {
|
||||
gh release upload $env:GITHUB_REF_NAME "$installer" --clobber
|
||||
} else {
|
||||
gh release create $env:GITHUB_REF_NAME "$installer" --title "$env:GITHUB_REF_NAME" --generate-notes
|
||||
}
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
|
||||
Reference in New Issue
Block a user