BuildSpigot with Latest BuildTools #242
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: BuildSpigot with Latest BuildTools | |
on: | |
schedule: | |
- cron: "0 0 6,12,18,24,30 * *" | |
workflow_dispatch: | |
push: | |
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@v4" | |
with: | |
# You can get the distribution lists at | |
# https://github.com/actions/setup-java#supported-distributions | |
distribution: "temurin" | |
# Use a proper Java version to execute the build application | |
java-version: "21" | |
# 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 "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT | |
- 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 |