-
Notifications
You must be signed in to change notification settings - Fork 7
49 lines (40 loc) · 1.56 KB
/
buildspigot-buildtools.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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