Skip to content

ci added

ci added #3

Workflow file for this run

name: Gradle CI
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
env:
JAVA_VERSION: 21
GRADLE_VERSION: '8.5' # Adjust if you want a different Gradle version
CACHE_KEY: gradle-local-repo
GRADLE_TASKS: build # Define your Gradle tasks here
jobs:
build:
name: 'Build & Test'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: ${{ env.JAVA_VERSION }}
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ env.CACHE_KEY }}-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ env.CACHE_KEY }}-${{ runner.os }}-
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
- name: Gradle Build
run: ./gradlew ${{ env.GRADLE_TASKS }} --no-daemon