Set up your GitHub Actions workflow with a specific version of Java
翻译准备中
开发工具GitHub @actions自行安装运营者未确认
试用过了吗? 点一下就好,无需登录。
尚未收集仓库信息。
尚未检测到更新。GitHub 发布版本后会显示在这里。
制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗Set up Java for GitHub Actions workflows. setup-java installs a requested Java distribution, adds it to PATH, configures JAVA_HOME, and can optionally cache build dependencies for Apache Maven, Gradle, and sbt; generate Maven publishing configuration, verify JDK package signatures, manage multiple JDKs, and manage Maven toolchains.
steps:
- uses: actions/checkout@v7
- uses: actions/setup-java@v6
with:
distribution: temurin
java-version: '25'
- run: java --version
latest stable release alias.settings.xml, Maven Toolchains, Maven GPG signing inputs, and environment-variable based credentials for publishing workflows.setup-java works with Java, Scala, Kotlin, Gradle, Maven, and sbt projects.
@actions/* packages.oracle-openjdk), Red Hat Build of OpenJDK (redhat), and Liberica Native Image Kit (liberica-nik), and expanded Tencent Kona support through JDK 25.java-version: latest to resolve the newest stable GA release from the distribution's remote metadata.18.0.1.1, Temurin jdk+jmods packages, and native musl artifacts on Alpine for Dragonwell, Corretto, Zulu, and Liberica.force-download: true to bypass the tool cache and perform a reproducible fresh install.cache-path and restore-only operation with cache-read-only: true..mvn/extensions.xml and gradle.properties, preventing stale restores when Maven extensions or Gradle dependency properties change.cache is set; use cache-jdk to enable or disable it independently.problem-matcher: true to enable them.GRAALVM_HOME in addition to JAVA_HOME.server-username -> server-username-env-varserver-password -> server-password-env-var以上为 README 的开头部分。其余内容请阅读原文。 查看完整 README ↗
gpg-passphrasegpg-passphrase-env-vargpg.passphraseEnvName instead of a deprecated gpg.passphrase server entry in settings.xml. This requires maven-gpg-plugin 3.2.0 or newer. See GPG.temurin instead of adopt or adopt-hotspot, and semeru instead of adopt-openj9.