From 6bcb98885c6327c7a1b8c309589c55665af82f7a Mon Sep 17 00:00:00 2001 From: richerfu Date: Sun, 6 Oct 2024 10:09:50 +0800 Subject: [PATCH] feat: export OHOS_NDK_HOME to env by default Signed-off-by: richerfu Signed-off-by: Jonathan Schwender --- action.yml | 1 - install_ohos_sdk.sh | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index e1b2cc5..0b401d1 100644 --- a/action.yml +++ b/action.yml @@ -66,4 +66,3 @@ runs: INPUT_FIXUP_PATH: ${{ inputs.fixup-path }} INPUT_MIRROR: "${{ inputs.mirror }}" GH_TOKEN: "${{ github.token }}" - diff --git a/install_ohos_sdk.sh b/install_ohos_sdk.sh index 248cc07..f5c7d75 100755 --- a/install_ohos_sdk.sh +++ b/install_ohos_sdk.sh @@ -106,8 +106,10 @@ done rm ./*.zip if [ "${INPUT_FIXUP_PATH}" = "true" ]; then + OHOS_NDK_HOME="${OHOS_BASE_SDK_HOME}/${API_VERSION}" OHOS_SDK_NATIVE="${OHOS_BASE_SDK_HOME}/${API_VERSION}/native" else + OHOS_NDK_HOME="${OHOS_BASE_SDK_HOME}" OHOS_SDK_NATIVE="${OHOS_BASE_SDK_HOME}/native" fi cd "${OHOS_SDK_NATIVE}" @@ -115,6 +117,7 @@ SDK_VERSION="$(jq -r .version < oh-uni-package.json )" API_VERSION="$(jq -r .apiVersion < oh-uni-package.json )" echo "OHOS_BASE_SDK_HOME=${OHOS_BASE_SDK_HOME}" >> "$GITHUB_ENV" echo "ohos-base-sdk-home=${OHOS_BASE_SDK_HOME}" >> "$GITHUB_OUTPUT" +echo "OHOS_NDK_HOME=${OHOS_NDK_HOME}" >> "$GITHUB_ENV" echo "OHOS_SDK_NATIVE=${OHOS_SDK_NATIVE}" >> "$GITHUB_ENV" echo "ohos_sdk_native=${OHOS_SDK_NATIVE}" >> "$GITHUB_OUTPUT" echo "sdk-version=${SDK_VERSION}" >> "$GITHUB_OUTPUT"