diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000000..445eb0dccb --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,26 @@ +name: publish + +on: + pull_request: + paths-ignore: + - '.github/ISSUE_TEMPLATE/**' + - '.github/workflows/web.yml' + - 'web/**' + push: + paths-ignore: + - '.github/ISSUE_TEMPLATE/**' + - '.github/workflows/web.yml' + - 'web/**' + branches: + - master + +jobs: + publish: + runs-on: windows-2025 + steps: + - name: Checkout + uses: actions/checkout@v5 + - name: Update toolchain + run: rustup update --no-self-update stable && rustup default stable + - name: Check + run: cargo publish --workspace --dry-run diff --git a/crates/libs/implement/Cargo.toml b/crates/libs/implement/Cargo.toml index e95c7f09cb..50f7b35959 100644 --- a/crates/libs/implement/Cargo.toml +++ b/crates/libs/implement/Cargo.toml @@ -4,7 +4,7 @@ version = "0.60.2" edition = "2021" rust-version = "1.74" license = "MIT OR Apache-2.0" -description = "The implement macro for the windows crate" +description = "The implement macro for the Windows crates" repository = "https://github.com/microsoft/windows-rs" categories = ["os::windows-apis"] readme = "readme.md" diff --git a/crates/libs/implement/readme.md b/crates/libs/implement/readme.md new file mode 100644 index 0000000000..8d80eacb59 --- /dev/null +++ b/crates/libs/implement/readme.md @@ -0,0 +1,3 @@ +## The implement macro for the Windows crates + +See [windows-core](https://crates.io/crates/windows-core) for more information. diff --git a/crates/libs/interface/Cargo.toml b/crates/libs/interface/Cargo.toml index 4fa4dc904c..c84aeec46a 100644 --- a/crates/libs/interface/Cargo.toml +++ b/crates/libs/interface/Cargo.toml @@ -4,7 +4,7 @@ version = "0.59.3" edition = "2021" rust-version = "1.74" license = "MIT OR Apache-2.0" -description = "The interface macro for the windows crate" +description = "The interface macro for the Windows crates" repository = "https://github.com/microsoft/windows-rs" categories = ["os::windows-apis"] readme = "readme.md" diff --git a/crates/libs/interface/readme.md b/crates/libs/interface/readme.md new file mode 100644 index 0000000000..1160db5ef8 --- /dev/null +++ b/crates/libs/interface/readme.md @@ -0,0 +1,3 @@ +## The interface macro for the Windows crates + +See [windows-core](https://crates.io/crates/windows-core) for more information. diff --git a/crates/tests/misc/package/tests/test.rs b/crates/tests/misc/package/tests/test.rs index 9d881cf522..5b7c7754df 100644 --- a/crates/tests/misc/package/tests/test.rs +++ b/crates/tests/misc/package/tests/test.rs @@ -34,6 +34,10 @@ fn test() { assert!(package.description.is_some()); assert!(!package.description.as_ref().unwrap().is_empty()); assert_eq!(package.readme, Some("readme.md".to_string())); + + let mut path = toml.path.expect("path"); + path.set_file_name("readme.md"); + assert!(path.exists(), "missing readme for crate: {}", package.name); } } } diff --git a/crates/tools/helpers/src/lib.rs b/crates/tools/helpers/src/lib.rs index 23e237c472..d69e5b4319 100644 --- a/crates/tools/helpers/src/lib.rs +++ b/crates/tools/helpers/src/lib.rs @@ -6,6 +6,7 @@ use std::path::Path; pub struct Crate { pub package: Package, pub lints: Option, + pub path: Option, } impl PartialEq for Crate { @@ -65,8 +66,9 @@ fn find>(path: P) -> Vec { crates.append(&mut find(file.path())); } else if file.file_name() == "Cargo.toml" { let text = std::fs::read_to_string(file.path()).expect("Cargo.toml"); - let toml: Crate = toml::from_str(&text).expect("toml"); - crates.push(toml); + let mut entry: Crate = toml::from_str(&text).expect("toml"); + entry.path = Some(file.path()); + crates.push(entry); } } }