Forráskód Böngészése

【修复】修复 GitHub Actions CI 工作流

- 新增 push.yml 工作流文件,配置 master 分支推送时的自动检查和发布流程
- 重构 release.yml 工作流,移除重复的检查逻辑,优化工作流结构
PJ568 1 éve
szülő
commit
52f8a106c2
4 módosított fájl, 22 hozzáadás és 9 törlés
  1. 18 0
      .github/workflows/push.yml
  2. 2 7
      .github/workflows/release.yml
  3. 1 1
      Cargo.lock
  4. 1 1
      Cargo.toml

+ 18 - 0
.github/workflows/push.yml

@@ -0,0 +1,18 @@
+name: On push
+
+on:
+  workflow_dispatch:
+  push:
+    branches:
+      - master
+
+jobs:
+  checks:
+    name: Checks
+    uses: ./.github/workflows/checks.yml
+  release:
+    name: Release
+    needs: checks
+    permissions: write-all
+    uses: ./.github/workflows/release.yml
+    secrets: inherit

+ 2 - 7
.github/workflows/release.yml

@@ -1,15 +1,10 @@
-name: release
+name: Create Release
 
 
 on:
 on:
   workflow_dispatch:
   workflow_dispatch:
-  push:
-    branches:
-      - master
+  workflow_call:
 
 
 jobs:
 jobs:
-  checks:
-    name: Checks
-    uses: ./.github/workflows/checks.yml
   release:
   release:
     runs-on: ubuntu-latest
     runs-on: ubuntu-latest
     permissions: write-all
     permissions: write-all

+ 1 - 1
Cargo.lock

@@ -942,7 +942,7 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
 
 
 [[package]]
 [[package]]
 name = "swb-sys-monitor"
 name = "swb-sys-monitor"
-version = "0.2.0"
+version = "0.2.1"
 dependencies = [
 dependencies = [
  "anyhow",
  "anyhow",
  "clap",
  "clap",

+ 1 - 1
Cargo.toml

@@ -1,6 +1,6 @@
 [package]
 [package]
 name = "swb-sys-monitor"
 name = "swb-sys-monitor"
-version = "0.2.0"
+version = "0.2.1"
 authors = ["PJ568 <[email protected]>"]
 authors = ["PJ568 <[email protected]>"]
 edition = "2024"
 edition = "2024"
 description = "为嵌入式设备高并发监控场景设计的极简网页资源占用显示系统"
 description = "为嵌入式设备高并发监控场景设计的极简网页资源占用显示系统"