Add CurseForge plugin
This commit is contained in:
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
@@ -57,6 +57,12 @@ jobs:
|
|||||||
name: ${{ steps.tagName.outputs.tag }}
|
name: ${{ steps.tagName.outputs.tag }}
|
||||||
files: |
|
files: |
|
||||||
build/libs/*.jar
|
build/libs/*.jar
|
||||||
|
- name: Release on CurseForge
|
||||||
|
run: ./gradlew curseforge
|
||||||
|
env:
|
||||||
|
RELEASE: ${{ steps.tagName.outputs.tag }}
|
||||||
|
CHANGELOG: ${{ steps.changelog_reader.outputs.changes }}
|
||||||
|
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }}
|
||||||
# This is necessary because the Discord action doesn't support GH actions variable expansion?
|
# This is necessary because the Discord action doesn't support GH actions variable expansion?
|
||||||
- name: Set release URL
|
- name: Set release URL
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
20
build.gradle
20
build.gradle
@@ -8,6 +8,10 @@ buildscript {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id 'com.matthewprenger.cursegradle' version '1.4.0'
|
||||||
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
url = "https://dvs1.progwml6.com/files/maven/"
|
url = "https://dvs1.progwml6.com/files/maven/"
|
||||||
@@ -125,6 +129,22 @@ jar {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (System.getenv("CURSEFORGE_TOKEN") != null) {
|
||||||
|
curseforge {
|
||||||
|
apiKey = System.getenv("CURSEFORGE_TOKEN")
|
||||||
|
project {
|
||||||
|
id = '243076'
|
||||||
|
changelog = System.getenv("CHANGELOG")
|
||||||
|
changelogType = 'markdown'
|
||||||
|
releaseType = project.version.toString().contains('beta') ? 'beta' : (project.version.toString().contains('alpha') ? 'alpha' : 'release')
|
||||||
|
|
||||||
|
mainArtifact(jar) {
|
||||||
|
displayName = "v$project.version"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
jar.finalizedBy('reobfJar')
|
jar.finalizedBy('reobfJar')
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
|
|||||||
Reference in New Issue
Block a user