This repository has been archived by the owner on Jun 1, 2024. It is now read-only.
Bump jvm from 1.9.22 to 1.9.23 #279
Workflow file for this run
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 Project | |
on: | |
push: | |
branches: [ master, ver/* ] | |
pull_request: | |
branches: [ master, ver/* ] | |
workflow_dispatch: | |
jobs: | |
setup: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
name: Gradle Setup | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: gradle/wrapper-validation-action@v2 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'gradle' | |
- name: Change Permissions | |
run: chmod +x ./gradlew | |
- name: Gradle Information | |
run: ./gradlew project :battlecards:dependencies | |
build: | |
runs-on: ubuntu-latest | |
needs: setup | |
timeout-minutes: 30 | |
strategy: | |
matrix: | |
java-version: [17, 18, 19] | |
java-vendor: [temurin, zulu] | |
name: Build Java ${{ matrix.java-version }}-${{ matrix.java-vendor }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK ${{ matrix.java-version }} | |
uses: actions/setup-java@v4 | |
with: | |
distribution: ${{ matrix.java-vendor }} | |
java-version: ${{ matrix.java-version }} | |
cache: 'gradle' | |
- name: Change Permissions | |
run: chmod +x ./gradlew | |
- name: Build with Gradle | |
run: ./gradlew clean assemble publishToMavenLocal | |
upload: | |
runs-on: ubuntu-latest | |
needs: build | |
timeout-minutes: 30 | |
name: Create Artifacts | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'gradle' | |
- name: Change Permissions | |
run: chmod +x ./gradlew | |
- name: Build with Gradle | |
run: ./gradlew clean assemble | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: battlecards | |
path: | | |
plugin/build/libs/*.jar | |
api/build/libs/*.jar | |
analyze: | |
runs-on: ubuntu-latest | |
needs: build | |
if: github.event_name != 'pull_request' | |
timeout-minutes: 30 | |
name: Analyze Project | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'gradle' | |
- name: Cache SonarCloud packages | |
uses: actions/cache@v4 | |
with: | |
path: ~/.sonar/cache | |
key: ${{ runner.os }}-sonar | |
restore-keys: ${{ runner.os }}-sonar | |
- name: Change Permissions | |
run: chmod +x ./gradlew | |
- name: Build and Analyze | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
run: ./gradlew clean assemble sonar --info | |
test: | |
runs-on: ubuntu-latest | |
needs: setup | |
timeout-minutes: 30 | |
name: Test Project | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'gradle' | |
- name: Change Permissions | |
run: chmod +x ./gradlew | |
- name: Build with Gradle | |
run: ./gradlew clean test | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
name: Deploy JavaDocs | |
if: ${{ github.event_name != 'pull_request' && github.ref_name == 'master' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'gradle' | |
- name: Change Permissions | |
run: chmod +x ./gradlew | |
- name: Build JavaDocs | |
run: ./gradlew :battlecards-api:clean :battlecards-api:dokkaJavadoc | |
- name: Deploy JavaDoc | |
run: bash javadoc.sh ${GITHUB_SHA::7} | |
test-server: | |
runs-on: ubuntu-latest | |
timeout-minutes: 360 | |
needs: test | |
strategy: | |
matrix: | |
version: [ 1.16.5, 1.15.2, 1.14.4, 1.13.2, 1.12.2, 1.11.2, 1.10.2, 1.9.4, 1.8.8 ] | |
java-version: [ 8 ] | |
include: | |
- version: 1.19.4 | |
java-version: 17 | |
- version: 1.20.4 | |
java-version: 17 | |
name: Test Plugin on MC ${{ matrix.version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup JDK ${{ matrix.java-version }} | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ matrix.java-version }} | |
distribution: 'temurin' | |
cache: 'gradle' | |
- name: Change Permissions | |
run: chmod +x ./gradlew | |
- name: Build Plugin | |
run: ./gradlew clean assemble | |
- name: Test Plugin - ${{ matrix.version }} | |
uses: GamerCoder215/[email protected] | |
with: | |
path: 'plugin/build/libs/battlecards-*.jar' | |
runtime: 'paper' | |
version: ${{ matrix.version }} | |
time: 120 |