chore(deps): bump actions/cache from 4 to 5 #16
This file contains hidden or 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: Build | |
| on: | |
| pull_request: | |
| branches: [ main ] | |
| paths-ignore: | |
| - '**/README.md' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v5 | |
| with: | |
| cache-read-only: false | |
| - name: Cache Gradle dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| - name: Validate Gradle wrapper | |
| run: | | |
| echo "Validating Gradle wrapper..." | |
| ./gradlew --version | |
| - name: Download dependencies | |
| run: | | |
| echo "Downloading project dependencies..." | |
| ./gradlew dependencies --configuration runtimeClasspath | |
| - name: Compile project | |
| run: | | |
| echo "Compiling Java sources..." | |
| echo "Java version: $(java -version 2>&1 | head -1)" | |
| echo "Gradle version: $(./gradlew --version | grep 'Gradle' | head -1)" | |
| ./gradlew build | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: jar | |
| path: | | |
| build/libs | |
| !build/libs/*-plain.jar | |
| retention-days: 30 |