Add GraalVM Community distribution support#1042
Conversation
|
@copilot I believe it is possible to have a cleaner implementation here. |
Cleaned up the GraalVM Community resolver (05917d5): dropped the asset-name regex in favor of deterministic prefix/suffix matching, replaced the manual pagination |
|
Linking the tracking issue: this PR implements #742 (GraalVM Community Edition distribution support). Maintainers — adding |
There was a problem hiding this comment.
Pull request overview
Adds a first-class graalvm-community distribution to actions/setup-java, enabling installation of FOSS GraalVM Community JDKs from graalvm/graalvm-ce-builds GitHub releases while keeping existing graalvm (Oracle) behavior intact.
Changes:
- Introduces
GraalVMCommunityDistributionthat resolves stable JDK 17+ versions by scanning GitHub Releases assets and selecting the highest satisfying version. - Adds
graalvm-communityto the distribution factory mapping. - Updates documentation and unit tests to cover the new distribution and toolcache namespace behavior.
Show a summary per file
| File | Description |
|---|---|
src/distributions/graalvm/installer.ts |
Adds community distribution implementation, GitHub releases resolution, and a distinct toolcache namespace. |
src/distributions/distribution-factory.ts |
Registers graalvm-community and returns the new installer implementation. |
README.md |
Documents graalvm-community in the supported distributions table and notes. |
docs/advanced-usage.md |
Adds an “Advanced usage” section/example for GraalVM Community. |
dist/setup/index.js |
Updates the compiled/bundled action output to include the new distribution. |
__tests__/distributors/graalvm-installer.test.ts |
Adds tests for the community installer behavior and factory mapping. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 5/6 changed files
- Comments generated: 2
| const releases = Array.isArray(response.result) ? response.result : []; | ||
| if (releases.length === 0) { | ||
| break; | ||
| } |
| - run: | | ||
| java -cp java HelloWorldApp | ||
| native-image -cp java HelloWorldApp | ||
| ``` |
Description:
Adds first-class support for GraalVM Community Edition so workflows can use
setup-javafor both Oracle GraalVM and the FOSS Community builds. This introduces a dedicatedgraalvm-communitydistribution while preserving existinggraalvmbehavior.Distribution support
graalvm-communityto the distribution factory.graalvm/graalvm-ce-buildsGitHub releases.Installer behavior
Docs and examples
graalvm-communityin supported distributions and advanced usage.Related issue:
#742
Check list: