add github workflow #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Gradle Build | |
on: | |
push: | |
branches: | |
- main # or your default branch name if it's not "main" | |
pull_request: | |
branches: | |
- main # trigger the build also for pull requests | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up JDK 20 | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'adopt' | |
java-version: '20' | |
- name: Grant execute permissions for gradlew | |
run: chmod +x ./gradlew | |
- name: Build with Gradle | |
run: ./gradlew clean build |