Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion crates/libs/implement/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 3 additions & 0 deletions crates/libs/implement/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## The implement macro for the Windows crates

See [windows-core](https://crates.io/crates/windows-core) for more information.
2 changes: 1 addition & 1 deletion crates/libs/interface/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 3 additions & 0 deletions crates/libs/interface/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## The interface macro for the Windows crates

See [windows-core](https://crates.io/crates/windows-core) for more information.
4 changes: 4 additions & 0 deletions crates/tests/misc/package/tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
6 changes: 4 additions & 2 deletions crates/tools/helpers/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use std::path::Path;
pub struct Crate {
pub package: Package,
pub lints: Option<Lints>,
pub path: Option<std::path::PathBuf>,
}

impl PartialEq for Crate {
Expand Down Expand Up @@ -65,8 +66,9 @@ fn find<P: AsRef<Path>>(path: P) -> Vec<Crate> {
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);
}
}
}
Expand Down