@@ -105,13 +105,9 @@ jobs:
105105
106106 - name : Create package-specific pyproject.toml
107107 run : |
108- # Work in a temporary directory
109- TEMP_DIR="/tmp/build-${{ matrix.features.package_name }}"
110- mkdir -p "${TEMP_DIR}"
111- cp -r . "${TEMP_DIR}/"
112- cd "${TEMP_DIR}"
113- sed -i 's/^name = "lindera-python"/name = "${{ matrix.features.package_name }}"/' pyproject.toml
114- sed -i 's/^description = ".*"/description = "${{ matrix.features.package_description }}"/' pyproject.toml
108+ # Modify pyproject.toml in place
109+ sed -i "s/^name = \"lindera-python\"/name = \"${{ matrix.features.package_name }}\"/" pyproject.toml
110+ sed -i "s/^description = \".*\"/description = \"${{ matrix.features.package_description }}\"/" pyproject.toml
115111
116112 - name : Build wheels
117113 uses : PyO3/maturin-action@v1
@@ -123,7 +119,6 @@ jobs:
123119 sccache : " true"
124120 manylinux : auto
125121 before-script-linux : " yum install openssl-devel devtoolset-10-libatomic-devel perl-IPC-Cmd -y"
126- working-directory : /tmp/build-${{ matrix.features.package_name }}
127122
128123 - name : Upload wheels
129124 uses : actions/upload-artifact@v4
@@ -172,13 +167,9 @@ jobs:
172167
173168 - name : Create package-specific pyproject.toml
174169 run : |
175- # Work in a temporary directory
176- TEMP_DIR="/tmp/build-${{ matrix.features.package_name }}"
177- mkdir -p "${TEMP_DIR}"
178- cp -r . "${TEMP_DIR}/"
179- cd "${TEMP_DIR}"
180- sed -i 's/^name = "lindera-python"/name = "${{ matrix.features.package_name }}"/' pyproject.toml
181- sed -i 's/^description = ".*"/description = "${{ matrix.features.package_description }}"/' pyproject.toml
170+ # Modify pyproject.toml in place
171+ sed -i "s/^name = \"lindera-python\"/name = \"${{ matrix.features.package_name }}\"/" pyproject.toml
172+ sed -i "s/^description = \".*\"/description = \"${{ matrix.features.package_description }}\"/" pyproject.toml
182173
183174 - name : Build wheels
184175 uses : PyO3/maturin-action@v1
@@ -190,7 +181,6 @@ jobs:
190181 sccache : " true"
191182 manylinux : auto
192183 before-script-linux : " apt-get update && apt-get install libssl-dev pkg-config -y"
193- working-directory : /tmp/build-${{ matrix.features.package_name }}
194184
195185 - name : Upload wheels
196186 uses : actions/upload-artifact@v4
@@ -241,18 +231,11 @@ jobs:
241231 - name : Create package-specific pyproject.toml
242232 shell : pwsh
243233 run : |
244- # Work in a temporary directory
245- $TEMP_DIR = "$env:TEMP\build-${{ matrix.features.package_name }}"
246- New-Item -ItemType Directory -Force -Path $TEMP_DIR
247- Copy-Item -Recurse -Force * $TEMP_DIR
248- Set-Location $TEMP_DIR
249234 # Replace package name and description in pyproject.toml
250235 $content = Get-Content pyproject.toml
251236 $content = $content -replace '^name = "lindera-python"', 'name = "${{ matrix.features.package_name }}"'
252237 $content = $content -replace '^description = ".*"', 'description = "${{ matrix.features.package_description }}"'
253238 Set-Content -Path pyproject.toml -Value $content
254- # Export the path for next step
255- echo "TEMP_BUILD_DIR=$TEMP_DIR" >> $env:GITHUB_ENV
256239
257240 - name : Build wheels
258241 uses : PyO3/maturin-action@v1
@@ -262,7 +245,6 @@ jobs:
262245 target : ${{ matrix.platform.target }}
263246 args : --release --out dist --find-interpreter --features=${{ matrix.features.value }}
264247 sccache : " true"
265- working-directory : ${{ env.TEMP_BUILD_DIR }}
266248
267249 - name : Upload wheels
268250 uses : actions/upload-artifact@v4
@@ -313,14 +295,9 @@ jobs:
313295
314296 - name : Create package-specific pyproject.toml
315297 run : |
316- # Work in a temporary directory
317- TEMP_DIR="/tmp/build-${{ matrix.features.package_name }}"
318- mkdir -p "${TEMP_DIR}"
319- cp -r . "${TEMP_DIR}/"
320- cd "${TEMP_DIR}"
321298 # macOS uses BSD sed which requires empty string for -i
322- sed -i '' ' s/^name = "lindera-python"/name = "${{ matrix.features.package_name }}"/' pyproject.toml
323- sed -i '' ' s/^description = ".*"/description = "${{ matrix.features.package_description }}"/' pyproject.toml
299+ sed -i '' " s/^name = \ "lindera-python\ "/name = \ "${{ matrix.features.package_name }}\"/" pyproject.toml
300+ sed -i '' " s/^description = \ ".*\ "/description = \ "${{ matrix.features.package_description }}\"/" pyproject.toml
324301
325302 - name : Build wheels
326303 uses : PyO3/maturin-action@v1
@@ -330,7 +307,6 @@ jobs:
330307 target : ${{ matrix.platform.target }}
331308 args : --release --out dist --find-interpreter --features=${{ matrix.features.value }}
332309 sccache : " true"
333- working-directory : /tmp/build-${{ matrix.features.package_name }}
334310
335311 - name : Upload wheels
336312 uses : actions/upload-artifact@v4
@@ -382,7 +358,7 @@ jobs:
382358 id : create_release
383359 uses : softprops/action-gh-release@v2
384360 with :
385- files : ./dist /*
361+ files : wheels-* /*
386362 name : Release ${{ github.ref_name }}
387363 tag_name : ${{ github.ref_name }}
388364 draft : false
0 commit comments