Skip to content

Commit

Permalink
Merge pull request #3
Browse files Browse the repository at this point in the history
Added modrinth publish
  • Loading branch information
NonSwag authored Jul 7, 2024
2 parents a3383a9 + d1fba6e commit 15e1c4d
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/modrinth-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Modrinth Publish

on:
release:
types:
- prereleased
- released

jobs:
build:
env:
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Publish with Gradle to Modrinth
uses: gradle/actions/setup-gradle@v3
with:
arguments: modrinth
13 changes: 13 additions & 0 deletions plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ plugins {
id("io.github.goooler.shadow") version "8.1.7"
id("net.minecrell.plugin-yml.paper") version "0.6.0"
id("io.papermc.hangar-publish-plugin") version "0.1.2"
id("com.modrinth.minotaur") version "2.+"
}

java {
Expand Down Expand Up @@ -170,6 +171,18 @@ hangarPublish { // docs - https://docs.papermc.io/misc/hangar-publishing
}
}

modrinth {
token.set(System.getenv("MODRINTH_TOKEN"))
projectId.set("YNoH2pBx")
versionType = if (isRelease) "release" else "beta"
uploadFile.set(tasks.shadowJar)
gameVersions.set(versions)
loaders.add("paper")
dependencies {
required.project("fastasyncworldedit")
}
}

publishing {
publications.create<MavenPublication>("maven") {
from(components["java"])
Expand Down

0 comments on commit 15e1c4d

Please sign in to comment.