setup-java/.github/workflows
Guillaume Smet 6657b99340
feat: Add set-default option (#1017)
* Add set-default option

This option allows to install an additional JDK without making it the
default one.

I have wanted this for quite a long time as I'm running custom GitHub
Actions with Java, which might require a specific JDK and I don't want
to pollute the JDK that is used by the overall workflow calling the
action.
And I'm apparently not alone as there was a preexisting issue.

Fixes #560

* Dedupe setJavaDefault and document multi-version/toolchain behavior

- Refactor setJavaDefault to delegate shared output/env logic to
  setJavaEnvironment, avoiding duplication between the two.
- Document that set-default applies to all JDKs in a multiline
  java-version, and that installed JDKs remain registered in Maven
  toolchains regardless of set-default.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* test: fix Prettier formatting in base-installer test

Resolves the failing 'Basic validation / build' format-check on
__tests__/distributors/base-installer.test.ts (line exceeded print width).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Bruno Borges <brborges@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-07 12:38:57 -04:00
..
basic-validation.yml chore: Harden workflows: least-privilege permissions + zizmor integration (#1039) 2026-06-23 18:10:17 +01:00
check-dist.yml chore: Harden workflows: least-privilege permissions + zizmor integration (#1039) 2026-06-23 18:10:17 +01:00
codeql-analysis.yml chore: Harden workflows: least-privilege permissions + zizmor integration (#1039) 2026-06-23 18:10:17 +01:00
e2e-cache-dependency-path.yml chore: Harden workflows: least-privilege permissions + zizmor integration (#1039) 2026-06-23 18:10:17 +01:00
e2e-cache.yml chore: Harden workflows: least-privilege permissions + zizmor integration (#1039) 2026-06-23 18:10:17 +01:00
e2e-local-file.yml chore: Harden workflows: least-privilege permissions + zizmor integration (#1039) 2026-06-23 18:10:17 +01:00
e2e-publishing.yml chore: Harden workflows: least-privilege permissions + zizmor integration (#1039) 2026-06-23 18:10:17 +01:00
e2e-versions.yml feat: Add set-default option (#1017) 2026-07-07 12:38:57 -04:00
licensed.yml chore: Harden workflows: least-privilege permissions + zizmor integration (#1039) 2026-06-23 18:10:17 +01:00
publish-immutable-actions.yml chore: Harden workflows: least-privilege permissions + zizmor integration (#1039) 2026-06-23 18:10:17 +01:00
release-new-action-version.yml Bump actions/publish-action from 0.3.0 to 0.4.0 (#912) 2025-12-03 20:46:45 -06:00
update-config-files.yml chore: Harden workflows: least-privilege permissions + zizmor integration (#1039) 2026-06-23 18:10:17 +01:00
zizmor.yml Bump actions/setup-python from 5 to 6 (#1067) 2026-06-29 09:13:25 +01:00