From 914985044a6d225088355aaf9b79db0b3fe27a1b Mon Sep 17 00:00:00 2001 From: Delice0 <59118341+Delice0@users.noreply.github.com> Date: Tue, 5 May 2026 23:09:56 +0200 Subject: [PATCH 1/2] added release workflow and env options to pass-through --- .github/workflows/release.yml | 70 +++++++++++++++++++++++++++++++++++ dist/launch_linux.sh | 2 +- dist/launch_mac.sh | 2 +- dist/launch_windows.cmd | 2 +- 4 files changed, 73 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..b6c7eab0 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,70 @@ +name: Release + +on: + push: + tags: + - 'v*' + +permissions: + contents: write + +jobs: + release: + runs-on: macos-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Build + run: ./scripts/build.sh + + - name: Write VERSION + run: echo "${GITHUB_REF_NAME}" > dist/VERSION + + - name: Package macOS aarch64 + run: | + mkdir -p staging + cp -r dist/classpath staging/ + cp dist/lang_server_mac.sh dist/launch_mac.sh dist/debug_adapter_mac.sh staging/ + cp -r dist/mac staging/ + cp dist/VERSION staging/ + tar -czf jls-macos-aarch64.tar.gz -C staging . + shasum -a 256 jls-macos-aarch64.tar.gz > jls-macos-aarch64.tar.gz.sha256 + rm -rf staging + + - name: Package Linux x64 + run: | + mkdir -p staging + cp -r dist/classpath staging/ + cp dist/lang_server_linux.sh dist/launch_linux.sh dist/debug_adapter_linux.sh staging/ + cp -r dist/linux staging/ + cp dist/VERSION staging/ + tar -czf jls-linux-x64.tar.gz -C staging . + shasum -a 256 jls-linux-x64.tar.gz > jls-linux-x64.tar.gz.sha256 + rm -rf staging + + - name: Package Windows x64 + run: | + mkdir -p staging + cp -r dist/classpath staging/ + cp dist/lang_server_windows.cmd dist/lang_server_windows.sh \ + dist/launch_windows.cmd dist/launch_windows.sh \ + dist/debug_adapter_windows.cmd dist/debug_adapter_windows.sh staging/ + cp -r dist/windows staging/ + cp dist/VERSION staging/ + cd staging && zip -r ../jls-windows-x64.zip . && cd .. + shasum -a 256 jls-windows-x64.zip > jls-windows-x64.zip.sha256 + rm -rf staging + + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + generate_release_notes: true + files: | + jls-macos-aarch64.tar.gz + jls-macos-aarch64.tar.gz.sha256 + jls-linux-x64.tar.gz + jls-linux-x64.tar.gz.sha256 + jls-windows-x64.zip + jls-windows-x64.zip.sha256 diff --git a/dist/launch_linux.sh b/dist/launch_linux.sh index d42132ce..136085a7 100755 --- a/dist/launch_linux.sh +++ b/dist/launch_linux.sh @@ -26,4 +26,4 @@ JLINK_VM_OPTIONS="\ DIR=`dirname $0` JAVA_BIN="$DIR/linux/bin/java" LOGGING_CONFIG="$DIR/linux/conf/logging.properties" -exec "$JAVA_BIN" $JLINK_VM_OPTIONS -Djava.util.logging.config.file="$LOGGING_CONFIG" -classpath "$DIR/classpath/*" "$@" +exec "$JAVA_BIN" $JLINK_VM_OPTIONS ${JLS_JAVA_OPTS:-} -Djava.util.logging.config.file="$LOGGING_CONFIG" -classpath "$DIR/classpath/*" "$@" diff --git a/dist/launch_mac.sh b/dist/launch_mac.sh index 0a63e2fe..9b8105c9 100755 --- a/dist/launch_mac.sh +++ b/dist/launch_mac.sh @@ -26,4 +26,4 @@ JLINK_VM_OPTIONS="\ DIR=`dirname $0` JAVA_BIN="$DIR/mac/bin/java" LOGGING_CONFIG="$DIR/mac/conf/logging.properties" -exec "$JAVA_BIN" $JLINK_VM_OPTIONS -Djava.util.logging.config.file="$LOGGING_CONFIG" -classpath "$DIR/classpath/*" "$@" +exec "$JAVA_BIN" $JLINK_VM_OPTIONS ${JLS_JAVA_OPTS:-} -Djava.util.logging.config.file="$LOGGING_CONFIG" -classpath "$DIR/classpath/*" "$@" diff --git a/dist/launch_windows.cmd b/dist/launch_windows.cmd index 6a063891..6145e01f 100644 --- a/dist/launch_windows.cmd +++ b/dist/launch_windows.cmd @@ -25,4 +25,4 @@ set JLINK_VM_OPTIONS=^ --add-opens jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED set CLASSPATH_OPTIONS=-classpath "%~dp0classpath/*" set JAVA_BIN=%~dp0windows\bin\java.exe -"%JAVA_BIN%" %JLINK_VM_OPTIONS% %CLASSPATH_OPTIONS% %* +"%JAVA_BIN%" %JLINK_VM_OPTIONS% %JLS_JAVA_OPTS% %CLASSPATH_OPTIONS% %* From f83273dee6f3ce577cbfad2d2cd09f7de6319664 Mon Sep 17 00:00:00 2001 From: Delice0 <59118341+Delice0@users.noreply.github.com> Date: Thu, 14 May 2026 12:31:06 +0200 Subject: [PATCH 2/2] cache jdks, updated windows launch to include logging props, deleted old release --- .github/workflows/release.yml | 6 ++++++ dist/launch_windows.cmd | 5 +++-- scripts/release.sh | 4 ---- 3 files changed, 9 insertions(+), 6 deletions(-) delete mode 100755 scripts/release.sh diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b6c7eab0..2ab1081e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,6 +16,12 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Cache JDKs + uses: actions/cache@v4 + with: + path: jdks/ + key: jdks-${{ hashFiles('scripts/download_*.sh') }} + - name: Build run: ./scripts/build.sh diff --git a/dist/launch_windows.cmd b/dist/launch_windows.cmd index 08eb15c9..aedda3cc 100644 --- a/dist/launch_windows.cmd +++ b/dist/launch_windows.cmd @@ -25,8 +25,9 @@ set JLINK_VM_OPTIONS=^ --add-opens jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED set CLASSPATH_OPTIONS=-classpath "%~dp0classpath/*" set JAVA_BIN=%~dp0windows\bin\java.exe +set LOGGING_CONFIG=%~dp0windows\conf\logging.properties if defined JLS_JVM_OPTS ( - "%JAVA_BIN%" %JLINK_VM_OPTIONS% %JLS_JVM_OPTS% %CLASSPATH_OPTIONS% %* + "%JAVA_BIN%" %JLINK_VM_OPTIONS% %JLS_JVM_OPTS% -Djava.util.logging.config.file="%LOGGING_CONFIG%" %CLASSPATH_OPTIONS% %* ) else ( - "%JAVA_BIN%" %JLINK_VM_OPTIONS% -Xmx2g -Xms512m -XX:MaxHeapFreeRatio=50 -XX:MinHeapFreeRatio=20 -XX:+UseStringDeduplication %CLASSPATH_OPTIONS% %* + "%JAVA_BIN%" %JLINK_VM_OPTIONS% -Xmx2g -Xms512m -XX:MaxHeapFreeRatio=50 -XX:MinHeapFreeRatio=20 -XX:+UseStringDeduplication -Djava.util.logging.config.file="%LOGGING_CONFIG%" %CLASSPATH_OPTIONS% %* ) diff --git a/scripts/release.sh b/scripts/release.sh deleted file mode 100755 index 27083a6b..00000000 --- a/scripts/release.sh +++ /dev/null @@ -1,4 +0,0 @@ -npm version patch -git push -git tag -f release -git push -f origin release \ No newline at end of file