Skip to content

Commit

Permalink
Enable toolchain with multiple JDKs
Browse files Browse the repository at this point in the history
  • Loading branch information
zhicwu committed Nov 29, 2021
1 parent 1b4b1d3 commit 32ba411
Showing 1 changed file with 27 additions and 4 deletions.
31 changes: 27 additions & 4 deletions .github/workflows/release.yml
Expand Up @@ -16,11 +16,34 @@ jobs:
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Install Java and Maven
uses: actions/setup-java@v1
- name: Install JDK 11
uses: AdoptOpenJDK/install-jdk@v1
with:
java-version: 11
- name: Update pom files and reduce logs
version: '11'
targets: 'JDK11_HOME'
- name: Setup Toolchain
shell: bash
run: |
mkdir -p $HOME/.m2 \
&& cat << EOF > $HOME/.m2/toolchains.xml
<?xml version="1.0" encoding="UTF8"?>
<toolchains>
<toolchain>
<type>jdk</type>
<provides>
<version>11</version>
</provides>
<configuration>
<jdkHome>${env.JDK11_HOME}</jdkHome>
</configuration>
</toolchain>
</toolchains>
EOF
- name: Install JDK 8 and Maven
uses: actions/setup-java@v2
with:
java-version: 8
- name: Update Configuration
run: |
find . -type f -name "pom.xml" -exec sed -i -e 's|${revision}|${{ github.event.inputs.version }}|g' \
-e 's|^\( <version>\).*\(</version>\)$|\1${{ github.event.inputs.version }}\2|' \
Expand Down

0 comments on commit 32ba411

Please sign in to comment.