Skip to content

Commit 09fc5ec

Browse files
authored
Fix packaging, introduce Trusted Publishing (#248)
1 parent 08dc078 commit 09fc5ec

File tree

7 files changed

+23
-16
lines changed

7 files changed

+23
-16
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,22 @@ on:
99
jobs:
1010
publish:
1111
runs-on: ubuntu-latest
12+
permissions:
13+
id-token: write # Required for OIDC token exchange
14+
1215
steps:
1316
- name: Checkout
1417
uses: actions/checkout@v4
1518

19+
- uses: rust-lang/crates-io-auth-action@v1
20+
id: auth
21+
1622
- name: cargo publish
1723
run: |
1824
cargo publish -p pyo3-stub-gen-derive
1925
cargo publish -p pyo3-stub-gen
2026
env:
21-
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
27+
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
2228

2329
next_version:
2430
runs-on: ubuntu-latest

Cargo.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ members = [
1111
resolver = "2"
1212

1313
[workspace.package]
14-
version = "0.11.0"
14+
version = "0.11.1"
1515
edition = "2021"
1616

1717
description = "Stub file (*.pyi) generator for PyO3"

examples/test-dash-package/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
[package]
22
name = "test-dash-package"
3-
version = "0.1.0"
4-
edition = "2021"
3+
version.workspace = true
4+
edition.workspace = true
55

66
[lib]
77
name = "test_dash_package"
88
crate-type = ["cdylib", "rlib"]
99

1010
[dependencies]
11-
pyo3 = { workspace = true }
11+
pyo3.workspace = true
1212
pyo3-stub-gen = { path = "../../pyo3-stub-gen" }
1313

1414
[[bin]]
1515
name = "stub_gen"
16-
path = "src/bin/stub_gen.rs"
16+
path = "src/bin/stub_gen.rs"

pyo3-stub-gen/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[package]
22
name = "pyo3-stub-gen"
3+
readme = "README.md"
34
version.workspace = true
45
edition.workspace = true
56
description.workspace = true
67
repository.workspace = true
78
keywords.workspace = true
89
license.workspace = true
9-
readme.workspace = true
1010

1111
[dependencies]
1212
anyhow.workspace = true
@@ -24,7 +24,7 @@ serde.workspace = true
2424
toml.workspace = true
2525

2626
[dependencies.pyo3-stub-gen-derive]
27-
version = "0.11.0"
27+
version = "0.11.1"
2828
path = "../pyo3-stub-gen-derive"
2929

3030
[dev-dependencies]

pyo3-stub-gen/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../README.md

pyo3-stub-gen/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,5 +199,5 @@ macro_rules! module_variable {
199199
};
200200
}
201201

202-
#[doc = include_str!("../../README.md")]
202+
#[doc = include_str!("../README.md")]
203203
mod readme {}

0 commit comments

Comments
 (0)