Skip to content

BuildSpigot with Latest BuildTools #196

BuildSpigot with Latest BuildTools

BuildSpigot with Latest BuildTools #196

name: BuildSpigot with Latest BuildTools
on:
schedule:
- cron: "0 0 6,12,18,24,30 * *"
workflow_dispatch:
jobs:
build:
runs-on: "ubuntu-latest"
steps:
# Get BuildTools from https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
- name: "Getting BuildTools"
run: "curl https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar -o ./BuildTools.jar"
- name: "Setting up Java Development Kit"
uses: "actions/setup-java@v2.1.0"
with:
distribution: "adopt"
java-version: "17"
# Build Spigot by BuildTools
- name: "Building Spigot"
# !! Change 'latest' to the version what you wanted. !!
# Also Java version need changing if you're trying building versions below 1.17.X!
run: "java -jar BuildTools.jar --rev latest"
# Uploading the build jar files.
- name: "Uploading Build"
uses: "actions/upload-artifact@v2"
with:
name: "Spigot"
path: "./spigot*.jar"
- name: "Getting Current Date"
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: "Creating Release"
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
title: "Nightly Spigot ${{ steps.date.outputs.date }}"
automatic_release_tag: "${{ steps.date.outputs.date }}"
files: |
./spigot*.jar