replace node-pre-gyp-github with gh release (#4329)

This commit is contained in:
Andrew Calcutt
2026-06-05 10:28:16 -04:00
committed by GitHub
parent 35126d6a51
commit 0642e7a913
4 changed files with 78 additions and 152 deletions

View File

@@ -4,8 +4,9 @@ set -e
set -o pipefail
PACKAGE_JSON_VERSION=`node -e "console.log(require('./package.json').version)"`
RELEASE_TAG="node-v${PACKAGE_JSON_VERSION}"
if [[ "${CIRCLE_TAG}" == "node-v${PACKAGE_JSON_VERSION}" ]] || [[ "${PUBLISH:-}" == true ]]; then
if [[ "${CIRCLE_TAG}" == "${RELEASE_TAG}" ]] || [[ "${PUBLISH:-}" == true ]]; then
# Changes to the version targets here should happen in tandem with updates to the
# EXCLUDE_NODE_ABIS property in cmake/node.cmake and the "node" engines property in
# package.json.
@@ -14,13 +15,13 @@ if [[ "${CIRCLE_TAG}" == "node-v${PACKAGE_JSON_VERSION}" ]] || [[ "${PUBLISH:-}"
if [[ "${BUILDTYPE}" == "RelWithDebInfo" ]]; then
./node_modules/.bin/node-pre-gyp package --target="${TARGET}" $@
./node_modules/.bin/node-pre-gyp-github publish
elif [[ "${BUILDTYPE}" == "Debug" ]]; then
./node_modules/.bin/node-pre-gyp package --target="${TARGET}" --debug $@
./node_modules/.bin/node-pre-gyp-github publish
else
echo "error: must provide either Debug or RelWithDebInfo for BUILDTYPE"
exit 1
fi
gh release upload "${RELEASE_TAG}" build/stage/${RELEASE_TAG}/*.tar.gz --clobber
done
fi