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 }}
|
||||
files: |
|
||||
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?
|
||||
- name: Set release URL
|
||||
run: |
|
||||
|
||||
20
build.gradle
20
build.gradle
@@ -8,6 +8,10 @@ buildscript {
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.matthewprenger.cursegradle' version '1.4.0'
|
||||
}
|
||||
|
||||
repositories {
|
||||
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')
|
||||
|
||||
publishing {
|
||||
|
||||
Reference in New Issue
Block a user