diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c40277d..3029bc2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -324,6 +324,26 @@ jobs: fi install -m 0755 "${BIN}" "${PKG_DIR}/${BINARY_NAME}" + # npm always ships README and LICENSE regardless of `files`, so + # placing them is enough. Without them the package page renders + # empty and npm reports the package as unlicensed. + LICENSE_SRC=$(find extract -type f -name LICENSE -print -quit) + if [[ -n "${LICENSE_SRC}" ]]; then + install -m 0644 "${LICENSE_SRC}" "${PKG_DIR}/LICENSE" + fi + + # Deliberately not the repository README: this package is not one + # users install directly, so it gets a note saying so. + cat > "${PKG_DIR}/README.md" < "${PKG_DIR}/package.json" < "${PKG_DIR}/bin/cli.js" <<'LAUNCHER'