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

[release-skip] First publish API

This commit is contained in:
violetc
2023-07-22 01:46:58 +08:00
parent d856b9ff14
commit d324bcbd23
4 changed files with 40 additions and 8 deletions

View File

@@ -11,7 +11,7 @@ on:
push:
branches: [ master ]
pull_request:
types: closed
types: [ closed ]
branches: [ master ]
workflow_dispatch:
@@ -41,9 +41,17 @@ jobs:
uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7
with:
arguments: createReobfPaperclipJar
- name: Publish API
uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7
with:
arguments: |
publish
-PleavesUsername={{ secrets.REPO_USERNAME }}
-PleavesPassword={{ secrets.REPO_PASSWORD }}
- name: Get Release Info
run: sh scripts/GetReleaseInfo.sh
- name: Create Release
if: !contains(github.event.commits[0].message, '[release-skip]')
uses: ncipollo/release-action@v1.12.0
with:
artifacts: ${{ env.jar }}

View File

@@ -22,17 +22,22 @@ You can also [build it yourself](https://github.com/LeavesMC/Leaves#building).
You can visit our [documentation](https://docs.leavesmc.top/leaves) for more information.
## How To (Plugin developers)
In order to use Leaves as a dependency you must [build it yourself](https://github.com/LeavesMC/Leaves#building).
Each time you want to update your dependency, you must re-build Leaves.
Leaves-API maven dependency:
Leaves-API:
```kotlin
maven {
name = 'leavesmc-repo'
url = 'https://repo.leavesmc.top/snapshots/'
}
dependencies {
compileOnly("top.leavesmc.leaves:leaves-api:1.20.1-R0.1-SNAPSHOT")
}
```
Leaves-Server maven dependency:
In order to use Leaves as a dependency you must [build it yourself](https://github.com/LeavesMC/Leaves#building).
Each time you want to update your dependency, you must re-build Leaves.
Leaves-Server:
```kotlin
dependencies {
compileOnly("top.leavesmc.leaves:leaves:1.20.1-R0.1-SNAPSHOT")

View File

@@ -22,15 +22,20 @@ Leaves
如果你想要获得更多信息,那么你可以访问我们的 [文档](https://docs.leavesmc.top/zh/leaves)
## 对于插件开发者
如果你要将 Leaves 作为依赖,那么你必须进行 [自行构建](https://github.com/LeavesMC/Leaves/blob/master/README_cn.md#自行构建)
Leaves-API:
```kotlin
maven {
name = 'leavesmc-repo'
url = 'https://repo.leavesmc.top/snapshots/'
}
dependencies {
compileOnly("top.leavesmc.leaves:leaves-api:1.20.1-R0.1-SNAPSHOT")
}
```
如果你要将 Leaves 作为依赖,那么你必须进行 [自行构建](https://github.com/LeavesMC/Leaves/blob/master/README_cn.md#自行构建)
Leaves-Server:
```kotlin
dependencies {

View File

@@ -1,5 +1,6 @@
plugins {
java
`maven-publish`
id("com.github.johnrengelman.shadow") version "8.1.1" apply false
id("io.papermc.paperweight.patcher") version "1.5.5"
}
@@ -66,3 +67,16 @@ paperweight {
}
}
}
allprojects {
apply(plugin = "maven-publish")
publishing {
repositories {
maven("https://repo.leavesmc.top/snapshots") {
name = "leaves"
credentials(PasswordCredentials::class)
}
}
}
}