From 555487d8d255e55fd4f8fca78be8cf6d4f35cbc4 Mon Sep 17 00:00:00 2001 From: nashaofu Date: Tue, 30 Jan 2024 10:00:27 +0800 Subject: [PATCH] feat: ci --- .github/workflows/lint.yaml | 21 +++++++++++++++++++++ README-zh_CN.md | 13 +++++++++++++ README.md | 13 +++++++++++++ 3 files changed, 47 insertions(+) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 01705fa..145a017 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -30,6 +30,7 @@ jobs: uses: actions-rs/toolchain@v1 with: toolchain: stable + override: true components: rustfmt, clippy - name: Cargo fmt @@ -40,3 +41,23 @@ jobs: - name: Test run: cargo test + publish: + name: Publish + runs-on: ubuntu-latest + needs: + - lint + steps: + - uses: actions/checkout@v3 + + - name: Install rust toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + components: rustfmt, clippy + + - name: Publish + if: github.event_name != 'pull_request' + env: + CARGO_TOKEN: ${{ secrets.CARGO_TOKEN }} + run: cargo publish --registry crates-io --token $NPM_TOKEN diff --git a/README-zh_CN.md b/README-zh_CN.md index e971fce..f600195 100644 --- a/README-zh_CN.md +++ b/README-zh_CN.md @@ -10,6 +10,19 @@ XCap 是一个使用 Rust 编写的跨平台的屏幕捕获库,它支持 Linux - 支持多种截图模式: 可以对屏幕与窗口进行截图。 - 支持视频录制:支持对屏幕或窗口进行录制(待实现)。 +### 实现状态 + +| 功能 | Linux(X11) | Linux(Wayland) | MacOS | Windows | +| -------- | ---------- | -------------- | ----- | ------- | +| 屏幕截图 | ✅ | ⛔ | ✅ | ✅ | +| 窗口截图 | ✅ | ⛔ | ✅ | ✅ | +| 屏幕录制 | 🛠️ | 🛠️ | 🛠️ | 🛠️ | +| 窗口录制 | 🛠️ | 🛠️ | 🛠️ | 🛠️ | + +- ✅: 功能可用 +- ⛔: 功能可用,但在一些特殊场景下未完全支持 +- 🛠️: 待开发 + ## 例子 - 屏幕截图 diff --git a/README.md b/README.md index 7a298b7..6e515eb 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,19 @@ XCap is a cross-platform screen capture library written in Rust. It supports Lin - Supports multiple screenshot modes: Can take screenshots of the screen and windows. - Supports video recording: Supports recording of the screen or window (to be implemented). +### Implementation Status + +| Feature | Linux(X11) | Linux(Wayland) | MacOS | Windows | +| ---------------- | ---------- | -------------- | ----- | ------- | +| Screen Capture | ✅ | ⛔ | ✅ | ✅ | +| Window Capture | ✅ | ⛔ | ✅ | ✅ | +| Screen Recording | 🛠️ | 🛠️ | 🛠️ | 🛠️ | +| Window Recording | 🛠️ | 🛠️ | 🛠️ | 🛠️ | + +- ✅: Feature available +- ⛔: Feature available, but not fully supported in some special scenarios +- 🛠️: To be developed + ## Examples - Screen Capture