mirror of
https://github.com/JamesPeters98/ChestsPlusPlus.git
synced 2025-02-27 09:51:36 +01:00
94 lines
2.5 KiB
YAML
94 lines
2.5 KiB
YAML
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
|
|
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
|
|
|
|
name: Build ChestsPlusPlus
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Cache BuildTools
|
|
id: cache-buildtools
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.m2
|
|
${GITHUB_WORKSPACE}/BuildTools/Bukkit
|
|
${GITHUB_WORKSPACE}/BuildTools/CraftBukkit
|
|
${GITHUB_WORKSPACE}/BuildTools/Spigot
|
|
${GITHUB_WORKSPACE}/BuildTools/BuildData
|
|
key: buildtools-cache
|
|
|
|
- name: Set up JDK 8
|
|
uses: actions/setup-java@v2
|
|
with:
|
|
java-version: '8'
|
|
distribution: 'adopt'
|
|
|
|
- name: Run BuildTools Pre 1.17
|
|
working-directory: ./BuildTools
|
|
run: |
|
|
ls ./BuildTools -R
|
|
# make file runnable, might not be necessary
|
|
chmod +x "${GITHUB_WORKSPACE}/BuildTools/build-pre1.17.sh"
|
|
# run script
|
|
bash build-pre1.17.sh
|
|
ls ~/.m2/repository/org/spigotmc/ -R
|
|
shell: bash
|
|
|
|
- name: Set up JDK 16
|
|
uses: actions/setup-java@v2
|
|
with:
|
|
java-version: '16'
|
|
distribution: 'adopt'
|
|
|
|
- name: Run BuildTools 1.17
|
|
working-directory: ./BuildTools
|
|
run: |
|
|
# make file runnable, might not be necessary
|
|
chmod +x "${GITHUB_WORKSPACE}/BuildTools/build-1.17.sh"
|
|
# run script
|
|
bash build-1.17.sh
|
|
ls ~/.m2/repository/org/spigotmc/ -R
|
|
shell: sh
|
|
|
|
- name: Set up JDK 17
|
|
uses: actions/setup-java@v2
|
|
with:
|
|
java-version: '17'
|
|
distribution: 'adopt'
|
|
|
|
- name: Run BuildTools 1.18+
|
|
working-directory: ./BuildTools
|
|
run: |
|
|
# make file runnable, might not be necessary
|
|
chmod +x "${GITHUB_WORKSPACE}/BuildTools/build-1.18+.sh"
|
|
# run script
|
|
bash build-1.18+.sh
|
|
ls ~/.m2/repository/org/spigotmc/ -R
|
|
shell: sh
|
|
|
|
- name: Build with Maven
|
|
run: mvn -B package --file pom.xml
|
|
|
|
- name: Upload Release Asset
|
|
id: upload-release-asset
|
|
uses: softprops/action-gh-release@v1
|
|
if: startsWith(github.event.ref, 'refs/tags/v')
|
|
with:
|
|
draft: true
|
|
generate_release_notes: true
|
|
files: |
|
|
${GITHUB_WORKSPACE}/Server/plugins/ChestsPlusPlus-*.jar
|
|
|