mirror of
https://github.com/swc-project/swc.git
synced 2024-11-23 17:54:15 +03:00
fix(ci): Fix publish action for binaries (#6517)
This commit is contained in:
parent
c82c65c0ba
commit
2ac32017ba
@ -1,5 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
mkdir -p artifacts_cli
|
||||
# Naive substitution to napi artifacts for the cli binary.
|
||||
for filename in artifacts/*/*.node
|
||||
do
|
||||
@ -9,8 +10,10 @@ do
|
||||
|
||||
if [ -f "$CLI_BINARY_PATH" ]; then
|
||||
chmod +x $CLI_BINARY_PATH
|
||||
cp $CLI_BINARY_PATH artifacts_cli/$BINDING_ABI
|
||||
mv $CLI_BINARY_PATH ./scripts/npm/$BINDING_ABI
|
||||
elif [ -f "$CLI_BINARY_PATH.exe" ]; then
|
||||
cp $CLI_BINARY_PATH.exe artifacts_cli/$BINDING_ABI
|
||||
mv $CLI_BINARY_PATH.exe ./scripts/npm/$BINDING_ABI
|
||||
fi
|
||||
done
|
@ -1,16 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Naive substitution to napi artifacts for the cli binary.
|
||||
for filename in artifacts/*/*.node
|
||||
for filename in artifacts_cli/*/*
|
||||
do
|
||||
echo "Trying to upload $filename"
|
||||
|
||||
BINDING_NAME=${filename#*.}
|
||||
BINDING_ABI=${BINDING_NAME%%.*}
|
||||
CLI_BINARY_PATH=${filename%%.*}
|
||||
|
||||
if [ -f "$CLI_BINARY_PATH" ]; then
|
||||
chmod +x $CLI_BINARY_PATH
|
||||
gh release upload $RELEASE_VERSION ./scripts/npm/$BINDING_ABI/$CLI_BINARY_PATH
|
||||
gh release upload $RELEASE_VERSION $CLI_BINARY_PATH
|
||||
elif [ -f "$CLI_BINARY_PATH.exe" ]; then
|
||||
gh release upload $RELEASE_VERSION ./scripts/npm/$BINDING_ABI/$CLI_BINARY_PATH/$CLI_BINARY_PATH.exe
|
||||
gh release upload $RELEASE_VERSION $CLI_BINARY_PATH.exe
|
||||
fi
|
||||
done
|
Loading…
Reference in New Issue
Block a user