diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index 6fd88bd10..6faf86c35 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -470,58 +470,57 @@ jobs: - name: Build voicevoxcore run: | cd crates/voicevox_core_java_api - function setup_dll() { + function copy_dll() { + artifact_name=$1 + target=$2 + root=$(echo $1 | grep -q android && echo jniLibs || echo dll) + dest="lib/src/main/resources/$root/$target" + mkdir -p $dest + cp -v "../../artifacts/voicevox_core_java_api-$artifact_name"/*.{dll,so,dylib} $dest + echo "$artifact_name => $dest" + } + function clean_dlls() { rm -rf lib/src/main/resources/dll rm -rf lib/src/main/resources/jniLibs - while IFS= read -r line; do - IFS=' ' read -r artifact_name target <<< "$line" - mkdir -p "lib/src/main/resources/$1/$target" - cp -v "../../artifacts/voicevox_core_java_api-$artifact_name"/*.{dll,so,dylib} "lib/src/main/resources/$1/$target/" || true - echo "$artifact_name => $1/$target" - done } # desktop: cpu - setup_dll dll <