diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index ee16919..c55e8c8 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -77,36 +77,17 @@ jobs: cp LICENSE.txt target cp target/cryptomator-*.jar target/mods - name: Run jlink - run: > - "${JAVA_HOME}/bin/jlink" - --verbose - --output target/runtime - --module-path "${JAVA_HOME}/jmods" - --add-modules java.base,java.compiler,java.naming,java.xml - --strip-native-commands - --no-header-files - --no-man-pages - --strip-debug - --compress zip-6 + run: | + envsubst < dist/jlink.args > target/jlink.args + "${JAVA_HOME}/bin/jlink" '@./target/jlink.args' - name: Run jpackage - run: > - "${JAVA_HOME}/bin/jpackage" - --verbose - --type app-image - --runtime-image target/runtime - --input target/libs - --module-path target/mods - --module org.cryptomator.cli/org.cryptomator.cli.CryptomatorCli - --dest target - --name cryptomator-cli - --vendor "Skymatic GmbH" - --copyright "(C) 2016 - 2024 Skymatic GmbH" - --app-version "${{ needs.prepare.outputs.semVerNum }}" - --java-options "-Dorg.cryptomator.cli.version=${{ needs.prepare.outputs.semVerStr }}" - --java-options "--enable-native-access=${{ matrix.native-access-lib }}" - --java-options "-Xss5m" - --java-options "-Xmx256m" - --java-options "-Dfile.encoding=\"utf-8\"" + run: | + envsubst < dist/jpackage.args > target/jpackage.args + "${JAVA_HOME}/bin/jpackage" '@./target/jpackage.args' --win-console + env: + JP_APP_VERSION: ${{ needs.prepare.outputs.semVerNum }} + APP_VERSION: ${{ needs.prepare.outputs.semVerStr }} + NATIVE_ACCESS_PACKAGE: ${{ matrix.native-access-lib }} - uses: actions/upload-artifact@v4 with: name: cryptomator-cli-linux-${{ matrix.architecture }} diff --git a/.github/workflows/build-mac.yml b/.github/workflows/build-mac.yml index b14d5f0..46534be 100644 --- a/.github/workflows/build-mac.yml +++ b/.github/workflows/build-mac.yml @@ -75,36 +75,17 @@ jobs: cp LICENSE.txt target cp target/cryptomator-*.jar target/mods - name: Run jlink - run: > - "${JAVA_HOME}/bin/jlink" - --verbose - --output target/runtime - --module-path "${JAVA_HOME}/jmods" - --add-modules java.base,java.compiler,java.naming,java.xml - --strip-native-commands - --no-header-files - --no-man-pages - --strip-debug - --compress zip-6 + run: | + envsubst < dist/jlink.args > target/jlink.args + "${JAVA_HOME}/bin/jlink" '@./target/jlink.args' - name: Run jpackage - run: > - "${JAVA_HOME}/bin/jpackage" - --verbose - --type app-image - --runtime-image target/runtime - --input target/libs - --module-path target/mods - --module org.cryptomator.cli/org.cryptomator.cli.CryptomatorCli - --dest target - --name cryptomator-cli - --vendor "Skymatic GmbH" - --copyright "(C) 2016 - 2024 Skymatic GmbH" - --app-version "${{ needs.prepare.outputs.semVerNum }}" - --java-options "-Dorg.cryptomator.cli.version=${{ needs.prepare.outputs.semVerStr }}" - --java-options "--enable-native-access=org.cryptomator.jfuse.mac" - --java-options "-Xss5m" - --java-options "-Xmx256m" - --java-options "-Dfile.encoding=\"utf-8\"" + run: | + envsubst < dist/jpackage.args > target/jpackage.args + "${JAVA_HOME}/bin/jpackage" '@./target/jpackage.args' --win-console + env: + JP_APP_VERSION: ${{ needs.prepare.outputs.semVerNum }} + APP_VERSION: ${{ needs.prepare.outputs.semVerStr }} + NATIVE_ACCESS_PACKAGE: org.cryptomator.jfuse.mac - uses: actions/upload-artifact@v4 with: name: cryptomator-cli-mac-${{ matrix.architecture }} diff --git a/.github/workflows/build-win.yml b/.github/workflows/build-win.yml index ac1ff6c..639ba44 100644 --- a/.github/workflows/build-win.yml +++ b/.github/workflows/build-win.yml @@ -67,37 +67,17 @@ jobs: cp LICENSE.txt target cp target/cryptomator-*.jar target/mods - name: Run jlink - run: > - "${JAVA_HOME}/bin/jlink" - --verbose - --output target/runtime - --module-path "${JAVA_HOME}/jmods" - --add-modules java.base,java.compiler,java.naming,java.xml - --strip-native-commands - --no-header-files - --no-man-pages - --strip-debug - --compress zip-6 + run: | + envsubst < dist/jlink.args > target/jlink.args + "${JAVA_HOME}/bin/jlink" '@./target/jlink.args' - name: Run jpackage - run: > - "${JAVA_HOME}/bin/jpackage" - --verbose - --type app-image - --runtime-image target/runtime - --input target/libs - --module-path target/mods - --module org.cryptomator.cli/org.cryptomator.cli.CryptomatorCli - --dest target - --name cryptomator-cli - --vendor "Skymatic GmbH" - --copyright "(C) 2016 - 2024 Skymatic GmbH" - --app-version "${{ needs.prepare.outputs.semVerNum }}" - --java-options "-Dorg.cryptomator.cli.version=${{ needs.prepare.outputs.semVerStr }}" - --java-options "--enable-native-access=org.cryptomator.jfuse.win" - --java-options "-Xss5m" - --java-options "-Xmx256m" - --java-options "-Dfile.encoding=\"utf-8\"" - --win-console + run: | + envsubst < dist/jpackage.args > target/jpackage.args + "${JAVA_HOME}/bin/jpackage" '@./target/jpackage.args' --win-console + env: + JP_APP_VERSION: ${{ needs.prepare.outputs.semVerNum }} + APP_VERSION: ${{ needs.prepare.outputs.semVerStr }} + NATIVE_ACCESS_PACKAGE: org.cryptomator.jfuse.win - uses: actions/upload-artifact@v4 with: name: cryptomator-cli-win-x64