Merge pull request #60 from SpraxDev/use-jdk-8

* GitHub Actions: Use JDK 8
* Use SpigotMC BuildTools by default
This commit is contained in:
Christian Koop 2021-04-01 21:53:05 +02:00 committed by GitHub
parent fd4df7496c
commit 3fa105973c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 187 additions and 171 deletions

View File

@ -21,6 +21,12 @@ jobs:
steps:
- uses: actions/checkout@v2
# Setup JDK version
- uses: actions/setup-java@v1
with:
java-version: '8'
java-package: jdk
- name: Compile 2 spigot version
uses: ./
with:
@ -44,6 +50,13 @@ jobs:
original-run:
runs-on: ubuntu-latest
steps:
# Setup JDK version
- uses: actions/setup-java@v1
with:
# This version should probably match the ones from the 'run'-job
java-version: '8'
java-package: jdk
- name: Run original Spigot-BuildTools
# These versions should match the ones from the 'run'-job
# Using '--compile Spigot' as this action does the same by default

View File

@ -73,7 +73,8 @@ as they are set automatically.
threads: -1 # Optional
# You can choose between different BuildTools to be used by this action
# 'SpraxDev' is my fork of SpigotMC's that introduces some changes (https://github.com/SpraxDev/Spigot-BuildTools/#breaking-changes)
# ~~'SpraxDev' is my fork of SpigotMC's that introduces some changes (https://github.com/SpraxDev/Spigot-BuildTools/#breaking-changes)~~
# My (SpraxDev) provider is causing some builds to fail depending on the build environment
# Available: SpraxDev, SpigotMC
buildToolProvider: SpraxDev # Optional
buildToolProvider: SpigotMC # Optional
```

View File

@ -33,8 +33,8 @@ inputs:
description: The amount of builds allowed to run at a time, set to '-1' to use system's cpu count
buildToolProvider:
required: false
default: SpraxDev
description: Whose BuildTool should be used? (SpraxDev [default], SpigotMC)
default: SpigotMC
description: Whose BuildTool should be used? (SpigotMC [default], SpraxDev)
runs:
using: node12

2
dist/index.js generated vendored

File diff suppressed because one or more lines are too long

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

2
dist/package.json generated vendored
View File

@ -47,8 +47,8 @@
"@types/async": "^3.2.5",
"@types/fs-extra": "^9.0.6",
"@types/n-readlines": "^1.0.1",
"@vercel/ncc": "^0.26.1",
"@types/node": "~12.19.11",
"@vercel/ncc": "^0.26.1",
"ts-node": "^9.1.1",
"typescript": "^4.1.3"
}

View File

@ -47,8 +47,8 @@
"@types/async": "^3.2.5",
"@types/fs-extra": "^9.0.6",
"@types/n-readlines": "^1.0.1",
"@vercel/ncc": "^0.26.1",
"@types/node": "~12.19.11",
"@vercel/ncc": "^0.26.1",
"ts-node": "^9.1.1",
"typescript": "^4.1.3"
}

View File

@ -29,7 +29,7 @@ const supportedBuildTools: { [key: string]: { url: string, prepareArgs: string[]
};
/* GitHub Actions inputs */
const buildToolProvider: string = (core.getInput('buildToolProvider') || 'SpraxDev').toLowerCase();
const buildToolProvider: string = (core.getInput('buildToolProvider') || 'SpigotMC').toLowerCase();
let versions: string[] = fixArgArr((core.getInput('versions') || 'latest').toLowerCase().split(','));
const generateSrc: boolean = core.getInput('generateSrc') == 'true';
const generateDoc: boolean = core.getInput('generateDoc') == 'true';
@ -49,6 +49,8 @@ async function run(): Promise<{ code: number, msg?: string }> {
if (!Object.keys(supportedBuildTools).includes(buildToolProvider)) {
return reject(new Error(`'${buildToolProvider}' is not a valid BuildTool-Provider (${Object.keys(supportedBuildTools).join(', ')})`));
} else if (buildToolProvider == 'spraxdev') {
logError(`SpraxDev's BuildTool has known issues causing builds to fail, please use 'SpigotMC' if you encounter any problems`);
}
if (!forceRun) {