Skip to content

Commit

Permalink
run workflows with java 21
Browse files Browse the repository at this point in the history
  • Loading branch information
brachy84 committed Nov 9, 2024
1 parent e897474 commit 98d88ea
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build_and_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4.1.7
uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}

Expand Down Expand Up @@ -104,23 +104,23 @@ jobs:
fi
- name: Setup Java
uses: actions/setup-java@v4.2.1
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '8'
java-version: '21'

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3.4.2
uses: gradle/actions/setup-gradle@v3

- name: Build Project
run: ./gradlew build

- name: Publish to GitHub
if: env.publish-gh == 'true'
uses: softprops/action-gh-release@v2.0.6
uses: softprops/action-gh-release@v2
with:
tag_name: "v${{ inputs.version }}"
token: ${{ secrets.PAT }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

steps:
- name: Checkout branch
uses: actions/checkout@v4.1.7
uses: actions/checkout@v4

# https://github.com/madhead/read-java-properties#error-java_home-is-set-to-an-invalid-directory
- name: Gather Gradle properties
Expand All @@ -43,23 +43,23 @@ jobs:
run: sed -i "s/mod_version.*=.*/mod_version = ${{ steps.gradle_properties.outputs.mod_version }}-${{ steps.vars.outputs.SHA_SHORT }}/g" gradle.properties

- name: Set up Temurin JDK 8
uses: actions/setup-java@v4.2.1
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '8'
java-version: '21'
cache: gradle # Only cache stuff since test build action happen mostly

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3.4.2
uses: gradle/actions/setup-gradle@v3

- name: Build Project
run: ./gradlew build

- name: Upload Build Artifacts
uses: actions/upload-artifact@v4.3.4
uses: actions/upload-artifact@v4
with:
name: GroovyScript-${{ steps.gradle_properties.outputs.modVersion }}-${{ github.run_number }}
path: build/libs

0 comments on commit 98d88ea

Please sign in to comment.