ci(release): unpack win32 sharp package without npm install
Release / release (push) Successful in 5m9s
Release / release (push) Successful in 5m9s
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -67,9 +67,18 @@ jobs:
|
||||
|
||||
- run: npm ci
|
||||
|
||||
# Иначе EBADPLATFORM: пакет только для win32, текущий раннер — linux.
|
||||
# Не используем `npm install`: на Linux npm падает с EBADPLATFORM для win32-пакета.
|
||||
- name: sharp (@img/sharp-win32-x64) для Windows-артефакта при сборке на Linux
|
||||
run: npm install --no-save --os=win32 --cpu=x64 @img/sharp-win32-x64@0.34.5
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
tmp="$(mktemp -d)"
|
||||
npm pack @img/sharp-win32-x64@0.34.5 --pack-destination "$tmp"
|
||||
mkdir -p node_modules/@img/sharp-win32-x64
|
||||
tar -xzf "$tmp/img-sharp-win32-x64-0.34.5.tgz" -C "$tmp"
|
||||
cp -a "$tmp/package/." node_modules/@img/sharp-win32-x64/
|
||||
test -f node_modules/@img/sharp-win32-x64/lib/sharp-win32-x64.node
|
||||
rm -rf "$tmp"
|
||||
|
||||
- run: npm run build
|
||||
|
||||
|
||||
Reference in New Issue
Block a user