Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(publish): trying to fix upload cli binaries #6517

Merged
merged 1 commit into from Nov 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions scripts/cli_artifacts.sh
@@ -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
Expand All @@ -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
8 changes: 5 additions & 3 deletions scripts/cli_upload_gh_release.sh
@@ -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