From e1933a30c812bf1decc823f045968931ab22fa4c Mon Sep 17 00:00:00 2001 From: Louis <836250617@qq.com> Date: Sat, 28 Dec 2024 01:03:37 +0800 Subject: [PATCH 1/2] ci/cargo clippy check --- .github/workflows/release.yml | 4 ++++ .husky/pre-commit | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dbca5602..39bfd097 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,6 +16,10 @@ jobs: contents: write steps: - uses: actions/checkout@v4 + + - name: clippy check + run: cd src-tauri && cargo clippy --all-targets --all-features -- -D warnings && cd .. + - run: gh release create "v${{ github.event.inputs.version }}" --title "Release v${{ github.event.inputs.version }}" --notes "如果下面没有可下载的文件,说明构建失败,请联系开发者" env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.husky/pre-commit b/.husky/pre-commit index e02c24e2..b3e891bf 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1 +1 @@ -pnpm lint-staged \ No newline at end of file +pnpm lint-staged || bun lint-staged From 15e019f7be7b2db856f7e3c6e66e43ecf95abd56 Mon Sep 17 00:00:00 2001 From: Louis <836250617@qq.com> Date: Sat, 28 Dec 2024 01:06:24 +0800 Subject: [PATCH 2/2] fix ci: cargo component add clippy in ci --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 39bfd097..45b6b716 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/checkout@v4 - name: clippy check - run: cd src-tauri && cargo clippy --all-targets --all-features -- -D warnings && cd .. + run: rustup component add clippy && cd src-tauri && cargo clippy --all-targets --all-features -- -D warnings && cd .. - run: gh release create "v${{ github.event.inputs.version }}" --title "Release v${{ github.event.inputs.version }}" --notes "如果下面没有可下载的文件,说明构建失败,请联系开发者" env: