aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/release-publish.yml37
-rw-r--r--build.gradle.kts8
2 files changed, 41 insertions, 4 deletions
diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml
new file mode 100644
index 0000000..96a8660
--- /dev/null
+++ b/.github/workflows/release-publish.yml
@@ -0,0 +1,37 @@
+name: Publish Release
+
+on:
+ push:
+ branches:
+ - '*/prod'
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ name: Publish with gradle
+
+ steps:
+ - uses: actions/checkout@v3
+ - name: Set up JDK
+ uses: actions/setup-java@v3
+ with:
+ java-version: 17
+ distribution: temurin
+ - uses: actions/cache@v3
+ with:
+ path: |
+ ~/.gradle/caches
+ ~/.gradle/wrapper
+ ./.gradle/loom-cache
+ key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
+ restore-keys: |
+ ${{ runner.os }}-gradle-
+ - name: Grant execute permission for gradlew
+ run: chmod +x gradlew
+ - name: Build with Gradle
+ run: ./gradlew releaseMod --no-daemon
+ env:
+ XANDER_MAVEN_USER: ${{ secrets.REPO_USERNAME }}
+ XANDER_MAVEN_PASS: ${{ secrets.REPO_PASSWORD }}
+ MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
+ CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }}
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/build.gradle.kts b/build.gradle.kts
index 7fa93c3..19a2756 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -121,12 +121,12 @@ val changelogText = file("changelogs/${project.version}.md").takeIf { it.exists(
val modrinthId: String by project
if (modrinthId.isNotEmpty()) {
modrinth {
- token.set(findProperty("modrinth.token")?.toString())
+ token.set(findProperty("MODRINTH_TOKEN")?.toString())
projectId.set(modrinthId)
versionNumber.set("${project.version}")
versionType.set("release")
uploadFile.set(tasks["remapJar"])
- gameVersions.set(listOf("1.19", "1.19.1", "1.19.2"))
+ gameVersions.set(listOf("1.19.3"))
loaders.set(listOf("fabric", "quilt"))
dependencies {
required.project("fabric-api")
@@ -139,7 +139,7 @@ if (modrinthId.isNotEmpty()) {
val curseforgeId: String by project
if (hasProperty("curseforge.token") && curseforgeId.isNotEmpty()) {
curseforge {
- apiKey = findProperty("curseforge.token")
+ apiKey = findProperty("CURSEFORGE_TOKEN")
project(closureOf<me.hypherionmc.cursegradle.CurseProject> {
mainArtifact(tasks["remapJar"], closureOf<me.hypherionmc.cursegradle.CurseArtifact> {
displayName = "${project.version}"
@@ -168,7 +168,7 @@ if (hasProperty("curseforge.token") && curseforgeId.isNotEmpty()) {
}
githubRelease {
- token(findProperty("github.token")?.toString())
+ token(findProperty("GITHUB_TOKEN")?.toString())
val githubProject: String by project
val split = githubProject.split("/")