207 lines
6.8 KiB
YAML
207 lines
6.8 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- '*'
|
|
|
|
env:
|
|
# Single line string with spaces between values.
|
|
MINECRAFT_VERSIONS: >-
|
|
1.8.8
|
|
1.12.2
|
|
1.16.5
|
|
1.17.1
|
|
1.18.2
|
|
1.19.4
|
|
1.20.1
|
|
1.20.4
|
|
1.20.6
|
|
1.21
|
|
1.21.1
|
|
1.21.4
|
|
1.21.5
|
|
1.21.7
|
|
1.21.8
|
|
1.21.9
|
|
1.21.10
|
|
1.21.11
|
|
26.1
|
|
26.1.1
|
|
26.1.2
|
|
# TODO can we auto-detect the versions based on the implementations present? probably yes!
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Set up BuildTools
|
|
run: wget -O BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
|
|
- name: Install JDK 8
|
|
uses: actions/setup-java@v5
|
|
with:
|
|
distribution: 'temurin'
|
|
java-version: '8'
|
|
cache: 'maven'
|
|
- name: Install CraftBukkit 1.8.8, 1.12.2, 1.16.5
|
|
run: |
|
|
java -jar BuildTools.jar --rev 1.8.8 --compile craftbukkit
|
|
java -jar BuildTools.jar --rev 1.12.2 --compile craftbukkit
|
|
java -jar BuildTools.jar --rev 1.16.5 --compile craftbukkit
|
|
- name: Install JDK 17
|
|
uses: actions/setup-java@v5
|
|
with:
|
|
distribution: 'microsoft'
|
|
java-version: '17'
|
|
cache: 'maven'
|
|
- name: Install CraftBukkit 1.17.1, 1.18.2, 1.19.4, 1.20.1, 1.20.4
|
|
run: |
|
|
java -jar BuildTools.jar --rev 1.17.1 --compile craftbukkit --remapped
|
|
java -jar BuildTools.jar --rev 1.18.2 --compile craftbukkit --remapped
|
|
java -jar BuildTools.jar --rev 1.19.4 --compile craftbukkit --remapped
|
|
java -jar BuildTools.jar --rev 1.20.1 --compile craftbukkit --remapped
|
|
java -jar BuildTools.jar --rev 1.20.4 --compile craftbukkit --remapped
|
|
- name: Install JDK 21
|
|
uses: actions/setup-java@v5
|
|
with:
|
|
distribution: 'microsoft'
|
|
java-version: '21'
|
|
cache: 'maven'
|
|
- name: Install CraftBukkit 1.20.6, 1.21, 1.21, 1.21.4, 1.21.5, 1.21.7, 1.21.9, 1.21.11
|
|
# Use build number 4287 to compile CraftBukkit 1.21,
|
|
# Use build number 4522 to compile CraftBukkit 1.21.7,
|
|
# Use build number 4539 to compile CraftBukkit 1.21.9
|
|
# https://hub.spigotmc.org/jira/browse/BUILDTOOLS-658
|
|
# https://hub.spigotmc.org/versions/
|
|
run: |
|
|
java -jar BuildTools.jar --rev 1.20.6 --compile craftbukkit --remapped
|
|
java -jar BuildTools.jar --rev 4287 --compile craftbukkit --remapped
|
|
java -jar BuildTools.jar --rev 1.21.1 --compile craftbukkit --remapped
|
|
java -jar BuildTools.jar --rev 1.21.4 --compile craftbukkit --remapped
|
|
java -jar BuildTools.jar --rev 1.21.5 --compile craftbukkit --remapped
|
|
java -jar BuildTools.jar --rev 4522 --compile craftbukkit --remapped
|
|
java -jar BuildTools.jar --rev 4539 --compile craftbukkit --remapped
|
|
java -jar BuildTools.jar --rev 4576 --compile craftbukkit --remapped
|
|
- name: Install Paper 1.21.11
|
|
run: |
|
|
mvn ca.bkaw:paper-nms-maven-plugin:init --pl :impl_paper_1_21_11
|
|
- name: Install JDK 25
|
|
uses: actions/setup-java@v5
|
|
with:
|
|
distribution: 'microsoft'
|
|
java-version: '25'
|
|
cache: 'maven'
|
|
# Use build number 4617 to compile CraftBukkit 26.1.1
|
|
# https://hub.spigotmc.org/versions/
|
|
- name: Install CraftBukkit 26.1.1
|
|
run: |
|
|
java -jar BuildTools.jar --rev 4617 --compile craftbukkit
|
|
- name: Install Paper 26.1.1
|
|
run: |
|
|
mvn ca.bkaw:paper-nms-maven-plugin:init --pl :impl_paper_26_1_1
|
|
- name: Compile InvSee++
|
|
run: mvn clean package install --batch-mode --update-snapshots
|
|
- name: Upload InvSee++
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: InvSee++
|
|
archive: false
|
|
path: InvSee++_Plugin/target/InvSee++.jar
|
|
- name: Upload InvSee++_Give
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: InvSee++_Give
|
|
archive: false
|
|
path: InvSee++_Give_Plugin/target/InvSee++_Give.jar
|
|
- name: Upload InvSee++_Clear
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: InvSee++_Clear
|
|
archive: false
|
|
path: InvSee++_Clear_Plugin/target/InvSee++_Clear.jar
|
|
- name: Upload InvSee++_Clone
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: InvSee++_Clone
|
|
archive: false
|
|
path: InvSee++_Clone_Plugin/target/InvSee++_Clone.jar
|
|
|
|
release_github:
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
|
|
steps:
|
|
- name: Download InvSee++ and addons
|
|
uses: actions/download-artifact@v8
|
|
with:
|
|
path: plugins
|
|
merge-multiple: true
|
|
- name: Set download-source to GitHub
|
|
run: |
|
|
echo GitHub > download-source.txt
|
|
zip plugins/InvSee++.jar download-source.txt
|
|
- name: Create Release on GitHub
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
files: |
|
|
plugins/InvSee++.jar
|
|
plugins/InvSee++_Give.jar
|
|
plugins/InvSee++_Clear.jar
|
|
plugins/InvSee++_Clone.jar
|
|
|
|
release_hangar:
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
|
|
steps:
|
|
- name: Download Hangar upload script
|
|
uses: actions/checkout@v6
|
|
with:
|
|
sparse-checkout: |
|
|
release-scripts
|
|
- name: Download InvSee++ and addons
|
|
uses: actions/download-artifact@v8
|
|
with:
|
|
path: plugins
|
|
merge-multiple: true
|
|
- name: Set download-source to Hangar
|
|
run: |
|
|
echo Hangar > download-source.txt
|
|
zip plugins/InvSee++.jar download-source.txt
|
|
- name: Publish new version to Hangar
|
|
env:
|
|
HANGAR_TOKEN: ${{ secrets.HANGAR_TOKEN }}
|
|
run: |
|
|
chmod +x release-scripts/mill-dist-1.1.5-mill.sh
|
|
./release-scripts/mill-dist-1.1.5-mill.sh release-scripts/hangar/HangarVersionUploader.java
|
|
|
|
release_modrinth:
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
|
|
steps:
|
|
- name: Download Modrinth upload script
|
|
uses: actions/checkout@v6
|
|
with:
|
|
sparse-checkout: |
|
|
release-scripts
|
|
- name: Download InvSee++ and addons
|
|
uses: actions/download-artifact@v8
|
|
with:
|
|
path: plugins
|
|
merge-multiple: true
|
|
- name: Set download-source to Modrinth
|
|
run: |
|
|
echo Modrinth > download-source.txt
|
|
zip plugins/InvSee++.jar download-source.txt
|
|
- name: Publish new version to Modrinth
|
|
env:
|
|
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
|
|
run: |
|
|
chmod +x release-scripts/mill-dist-1.1.5-mill.sh
|
|
./release-scripts/mill-dist-1.1.5-mill.sh release-scripts/modrinth/ModrinthVersionUploader.java
|