Skip to content

Commit 0a6e758

Browse files
committed
Fix release.yml
1 parent e634e32 commit 0a6e758

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

.github/workflows/release.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -232,22 +232,26 @@ jobs:
232232
architecture: ${{ matrix.platform.target }}
233233

234234
- name: Create package-specific pyproject.toml
235+
shell: pwsh
235236
run: |
236237
# Work in a temporary directory
237-
TEMP_DIR="/tmp/build-${{ matrix.features.package_name }}"
238-
mkdir -p "${TEMP_DIR}"
239-
cp -r . "${TEMP_DIR}/"
240-
cd "${TEMP_DIR}"
241-
sed -i 's/^name = "lindera-python"/name = "${{ matrix.features.package_name }}"/' pyproject.toml
242-
sed -i 's/^description = ".*"/description = "${{ matrix.features.package_description }}"/' pyproject.toml
238+
$TEMP_DIR = "$env:TEMP\build-${{ matrix.features.package_name }}"
239+
New-Item -ItemType Directory -Force -Path $TEMP_DIR
240+
Copy-Item -Recurse -Force * $TEMP_DIR
241+
Set-Location $TEMP_DIR
242+
# Replace package name and description in pyproject.toml
243+
$content = Get-Content pyproject.toml
244+
$content = $content -replace '^name = "lindera-python"', 'name = "${{ matrix.features.package_name }}"'
245+
$content = $content -replace '^description = ".*"', 'description = "${{ matrix.features.package_description }}"'
246+
Set-Content -Path pyproject.toml -Value $content
243247
244248
- name: Build wheels
245249
uses: PyO3/maturin-action@v1
246250
with:
247251
target: ${{ matrix.platform.target }}
248-
args: --release --out ../dist --find-interpreter --features=${{ matrix.features.value }}
252+
args: --release --out ..\dist --find-interpreter --features=${{ matrix.features.value }}
249253
sccache: "false"
250-
working-directory: /tmp/build-${{ matrix.features.package_name }}
254+
working-directory: ${{ env.TEMP }}\build-${{ matrix.features.package_name }}
251255

252256
- name: Upload wheels
253257
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)