Skip to content

Commit c33af8f

Browse files
committed
fix(3p-notice): include third party notices in maturin
1 parent 5e8101c commit c33af8f

File tree

2 files changed

+30
-24
lines changed

2 files changed

+30
-24
lines changed

.github/workflows/release.yml

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,30 @@ jobs:
2424
name: Cargo.toml
2525
path: Cargo.toml
2626

27+
generate-3p-notices:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v4
31+
- uses: actions/download-artifact@v4
32+
with:
33+
name: Cargo.toml
34+
- name: Rust Cache
35+
uses: Swatinem/rust-cache@v2
36+
- name: Install Rust toolchain
37+
uses: dtolnay/rust-toolchain@stable
38+
- name: Install cargo-about
39+
run: cargo install --locked cargo-about
40+
- name: Generate THIRD_PARTY_NOTICES.html
41+
run: cargo about generate -o THIRD_PARTY_NOTICES.html about.hbs
42+
- name: Upload THIRD_PARTY_NOTICES.html artifact
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: THIRD_PARTY_NOTICES.html
46+
path: THIRD_PARTY_NOTICES.html
47+
2748
build:
2849
runs-on: ${{ matrix.platform.runner }}
29-
needs: [create-versioned-toml]
50+
needs: [create-versioned-toml, generate-3p-notices]
3051
strategy:
3152
matrix:
3253
platform:
@@ -40,6 +61,9 @@ jobs:
4061
- uses: actions/download-artifact@v4
4162
with:
4263
name: Cargo.toml
64+
- uses: actions/download-artifact@v4
65+
with:
66+
name: THIRD_PARTY_NOTICES.html
4367
- uses: actions/setup-python@v5
4468
with:
4569
python-version: 3.13
@@ -77,12 +101,15 @@ jobs:
77101

78102
sdist:
79103
runs-on: ubuntu-latest
80-
needs: [create-versioned-toml]
104+
needs: [create-versioned-toml, generate-3p-notices]
81105
steps:
82106
- uses: actions/checkout@v4
83107
- uses: actions/download-artifact@v4
84108
with:
85109
name: Cargo.toml
110+
- uses: actions/download-artifact@v4
111+
with:
112+
name: THIRD_PARTY_NOTICES.html
86113
- name: Build sdist
87114
uses: PyO3/maturin-action@v1
88115
with:
@@ -94,28 +121,6 @@ jobs:
94121
name: wheels-sdist
95122
path: dist
96123

97-
generate-3p-notices:
98-
runs-on: ubuntu-latest
99-
needs: [create-versioned-toml]
100-
steps:
101-
- uses: actions/checkout@v4
102-
- uses: actions/download-artifact@v4
103-
with:
104-
name: Cargo.toml
105-
- name: Rust Cache
106-
uses: Swatinem/rust-cache@v2
107-
- name: Install Rust toolchain
108-
uses: dtolnay/rust-toolchain@stable
109-
- name: Install cargo-about
110-
run: cargo install --locked cargo-about
111-
- name: Generate THIRD_PARTY_NOTICES.html
112-
run: cargo about generate -o THIRD_PARTY_NOTICES.html about.hbs
113-
- name: Upload THIRD_PARTY_NOTICES.html artifact
114-
uses: actions/upload-artifact@v4
115-
with:
116-
name: THIRD_PARTY_NOTICES.html
117-
path: THIRD_PARTY_NOTICES.html
118-
119124
release:
120125
name: Release
121126
runs-on: ubuntu-latest

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ bindings = "pyo3"
5757
python-source = "python"
5858
module-name = "cocoindex._engine"
5959
features = ["pyo3/extension-module"]
60+
include = ["THIRD_PARTY_NOTICES.html"]
6061

6162
[project.optional-dependencies]
6263
dev = ["pytest", "pytest-asyncio", "ruff", "mypy", "pre-commit"]

0 commit comments

Comments
 (0)