Update Gradle actions #91
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: Gradle Build | |
| on: | |
| push: | |
| branches: ["**"] | |
| tags-ignore: ["**"] | |
| pull_request: | |
| release: | |
| types: [published] | |
| jobs: | |
| build: | |
| # Only run on PRs if the source branch is on someone else's repo | |
| if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }} | |
| runs-on: "ubuntu-latest" | |
| defaults: | |
| run: | |
| working-directory: code | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: "temurin" | |
| java-version: 21 | |
| - uses: gradle/actions/setup-gradle@v4 | |
| with: | |
| # allow master and *-dev branches to write caches (default is only master/main) | |
| cache-read-only: ${{ github.ref != 'refs/heads/master' && !(endsWith(github.ref, '-dev') && startsWith(github.ref, 'refs/heads/')) }} | |
| - name: Build | |
| run: ./gradlew build |