9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2025-12-19 14:59:32 +00:00

Update CI

This commit is contained in:
violetc
2025-04-22 18:15:03 +08:00
parent 359e1be5e6
commit 3941929ae2
2 changed files with 14 additions and 10 deletions

View File

@@ -8,6 +8,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
if: github.repository == 'LeavesMC/Leaves'
steps:
- name: Get repository
uses: actions/checkout@v4
@@ -37,7 +38,9 @@ jobs:
env:
BUILD_NUMBER: ${{ env.BUILD_NUMBER }}
- name: Publish to Maven repo
run: ./gradlew :leaves-api:publish
run: |
./gradlew :leaves-api:publish
./gradlew :leaves-server:publishDevBundlePublicationToLeavesRepository -PpublishDevBundle=true
env:
LEAVES_USERNAME: ${{ secrets.NEW_REPO_USERNAME }}
LEAVES_PASSWORD: ${{ secrets.NEW_REPO_PASSWORD }}
@@ -95,11 +98,3 @@ jobs:
secret_v2: ${{ secrets.API_V2_PUSH_TOKEN }}
tag: ${{ env.tag }}
run: sh scripts/PushToAPI.sh
- name: Upload to cloud
if: "!contains(github.event.commits[0].message, '[release-skip]')"
continue-on-error: true
uses: wei/rclone@v1
env:
RCLONE_CONF: ${{ secrets.RCLONE_CONF }}
with:
args: copy ${{ env.jar }} FTP:${{ env.tag }} --contimeout 10s --progress

View File

@@ -1,6 +1,6 @@
--- a/paper-server/build.gradle.kts
+++ b/paper-server/build.gradle.kts
@@ -5,14 +_,14 @@
@@ -5,14 +_,15 @@
plugins {
`java-library`
`maven-publish`
@@ -9,6 +9,7 @@
}
val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"
+val leavesMavenPublicUrl = "https://repo.leavesmc.com/snapshots/"
dependencies {
mache("io.papermc:mache:1.21.4+build.7")
@@ -36,6 +37,14 @@
spigot {
buildDataRef = "3edaf46ec1eed4115ce1b18d2846cded42577e42"
packageVersion = "v1_21_R3" // also needs to be updated in MappingEnvironment
@@ -43,6 +_,7 @@
libraryRepositories.addAll(
"https://repo.maven.apache.org/maven2/",
paperMavenPublicUrl,
+ leavesMavenPublicUrl
)
}
@@ -101,7 +_,21 @@
}
}