Skip to content

Show ~/.m2/toolchains.xml changes with actions/setup-java #20

Show ~/.m2/toolchains.xml changes with actions/setup-java

Show ~/.m2/toolchains.xml changes with actions/setup-java #20

Workflow file for this run

name: Publish tagged Picnic release variant to GitHub Packages
on:
push:
permissions:
contents: read
jobs:
publish:
runs-on: ubuntu-24.04
permissions:
contents: read
packages: write
steps:
- name: Install Harden-Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
api.adoptium.net:443
github.com:443
maven.pkg.github.com:443
objects.githubusercontent.com:443
oss.sonatype.org:443
repo.maven.apache.org:443
- name: Show original `~/.m2/toolchains.xml`.
run: cat ~/.m2/toolchains.xml
# XXX: We're using `actions/setup-java` here because
# `s4u/setup-maven-action` does not appear to support the multi-version
# `java-version` syntax in a way that also causes both versions to be
# registered in `~/.m2/toolchains.xml`. See
# https://github.com/s4u/setup-maven-action/pull/112.
- name: Set up JDKs
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
with:
java-version: |
24-ea
17
distribution: temurin
- name: Show `~/.m2/toolchains.xml` after `actions/setup-java`.
run: cat ~/.m2/toolchains.xml
- name: Check out code and set up Maven
uses: s4u/setup-maven-action@4f7fb9d9675e899ca81c6161dadbba0189a4ebb1 # v1.18.0
with:
java-version: 17
java-distribution: temurin
maven-version: 3.9.9
- name: Show `~/.m2/toolchains.xml` after `actions/setup-java` and `s4u/setup-maven-action`.
run: cat ~/.m2/toolchains.xml