diff --git a/scripts/ci/ci-node-path.sh b/scripts/ci/ci-node-path.sh new file mode 100644 index 0000000..eb5b398 --- /dev/null +++ b/scripts/ci/ci-node-path.sh @@ -0,0 +1,2 @@ +#!/bin/sh +export PATH="/usr/local/bin:$PATH" diff --git a/scripts/ci/setup-node.sh b/scripts/ci/setup-node.sh index 5625d5d..7cb8395 100755 --- a/scripts/ci/setup-node.sh +++ b/scripts/ci/setup-node.sh @@ -46,5 +46,21 @@ echo "SHA256 verified: ${ACTUAL}" sudo tar -xJf /tmp/node.tar.xz -C /usr/local --strip-components=1 rm -f /tmp/node.tar.xz /tmp/node-shasums.txt +export PATH="/usr/local/bin:$PATH" + +# Act / Gitea runners often ship an older Node in /usr/bin; later steps start a new shell. +if [ -n "${GITHUB_ENV:-}" ]; then + echo "PATH=/usr/local/bin:$PATH" >> "$GITHUB_ENV" +fi +if [ -n "${GITEA_ENV:-}" ]; then + echo "PATH=/usr/local/bin:$PATH" >> "$GITEA_ENV" +fi +if [ -n "${GITHUB_PATH:-}" ]; then + echo "/usr/local/bin" >> "$GITHUB_PATH" +fi +if [ -n "${GITEA_PATH:-}" ]; then + echo "/usr/local/bin" >> "$GITEA_PATH" +fi + node --version npm --version diff --git a/scripts/ci/setup-pnpm.sh b/scripts/ci/setup-pnpm.sh index 20f7c17..7f543b1 100755 --- a/scripts/ci/setup-pnpm.sh +++ b/scripts/ci/setup-pnpm.sh @@ -3,6 +3,8 @@ # Usage: setup-pnpm.sh [version] set -eu +export PATH="/usr/local/bin:$PATH" + PNPM_VERSION="${1:-10.32.1}" corepack enable