Skip to content

Commit

Permalink
Github actions - JDKs install fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jindrapetrik committed Oct 10, 2024
1 parent 45bcfd7 commit 0087b10
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,14 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK 8
uses: AdoptOpenJDK/install-jdk@v1
- name: Set up JDKs
uses: actions/setup-java@v4
with:
version: '8'
distribution: oracle
architecture: x64
targets: 'JDK_8;JAVA_HOME'
- name: Set up JDK 21
uses: AdoptOpenJDK/install-jdk@v1
with:
version: '21'
architecture: x64
targets: 'JDK_21'
java-version: |
8
21
- name: Set up PHP
run: |
apt update -y -qq
Expand Down
12 changes: 6 additions & 6 deletions cicd_scripts/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ VERSION_PROP_FILE="version.properties"
if [ -z ${GITHUB_ACCESS_TOKEN+x} ]; then
# password not set, just make private release without publishing result
echo "No password set, making private release..."
JAVA_HOME=$JDK_8
JAVA_HOME=$JAVA_HOME_8_x64
ant all
# Javadoc generation is buggy with Java 8, lets generate it with Java 21
JAVA_HOME=$JDK_21
JAVA_HOME=$JAVA_HOME_21_x64
ant javadoc
else
# if tag set
Expand All @@ -38,13 +38,13 @@ else
echo "revision=$CICD_COMMIT">>$VERSION_PROP_FILE
echo "debug=false">>$VERSION_PROP_FILE

JAVA_HOME=$JDK_8
JAVA_HOME=$JAVA_HOME_8_x64

#compile, build, create files
ant new-version

# Javadoc generation is buggy with Java 8, lets generate it with Java 21
JAVA_HOME=$JDK_21
JAVA_HOME=$JAVA_HOME_21_x64
ant release_lib_javadoc

# release standard version based on tag
Expand Down Expand Up @@ -94,12 +94,12 @@ else
echo "revision=$CICD_COMMIT">>$VERSION_PROP_FILE
echo "debug=true">>$VERSION_PROP_FILE

JAVA_HOME=$JDK_8
JAVA_HOME=$JAVA_HOME_8_x64
#compile, build, create files
ant new-version

# Javadoc generation is buggy with Java 8, lets generate it with Java 21
JAVA_HOME=$JDK_21
JAVA_HOME=$JAVA_HOME_21_x64
ant release_lib_javadoc

CURRENT_DATE=`date +%Y-%m-%dT%H:%M:%SZ`
Expand Down

0 comments on commit 0087b10

Please sign in to comment.