chore(deps): Update dependency org.jetbrains:annotations to v26 #127
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: Build Pull Request | |
on: | |
push: | |
branches: | |
- mc/* # MC version updates | |
- pr/* # PR rebases | |
pull_request: | |
branches: | |
- master | |
- feat/* | |
- fix/* | |
- feature/* | |
- mc/* | |
- dev/* | |
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 }}" | |
strategy: | |
matrix: | |
java: ["17"] | |
os: ["ubuntu-latest"] | |
runs-on: "${{ matrix.os }}" | |
steps: | |
- name: "checkout repository" | |
uses: "actions/checkout@v2" | |
- name: "validate gradle wrapper" | |
uses: "gradle/wrapper-validation-action@v1" | |
- name: "Setup JDK ${{ matrix.java }}" | |
uses: actions/setup-java@v3 | |
with: | |
distribution: "temurin" | |
java-version: "${{ matrix.java }}" | |
cache: "gradle" | |
# Actually build | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
~/.gradle/jdks | |
key: "${{ runner.os }}-delta-${{ hashFiles('**/*.gradle*') }}" | |
restore-keys: | | |
${{ runner.os }}-delta- | |
- name: "run gradle build" | |
uses: "gradle/gradle-build-action@v2" | |
with: | |
arguments: "build --stacktrace" | |
- name: Archive plugin jars on GitHub | |
uses: actions/upload-artifact@master | |
if: success() | |
with: | |
name: Cyclone plugin jars | |
path: build/libs/** | |
if-no-files-found: error | |
- name: Cleanup Gradle Cache | |
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions. | |
# Restoring these files from a GitHub Actions cache might cause problems for future builds. | |
run: | | |
rm -f ~/.gradle/caches/modules-2/modules-2.lock | |
rm -f ~/.gradle/caches/modules-2/gc.properties |