deployment: add Modrinth API key to deployment scripts and update channel naming conventions

This commit is contained in:
Oliver
2025-03-29 21:55:37 +01:00
parent 84adb42dca
commit 17233dbaa4
6 changed files with 7 additions and 23 deletions

View File

@@ -34,6 +34,8 @@ jobs:
run: ./gradlew :tools:deployment:shadowJar run: ./gradlew :tools:deployment:shadowJar
- name: Deploy - name: Deploy
env:
MODRINTH_API_KEY: ${{ secrets.MODRINTH_API_KEY }}
run: run:
cd tools/deployment/build/libs && cd tools/deployment/build/libs &&
java -jar deployment.jar ../../../../plugins/fancyholograms/release_deployment_config.json java -jar deployment.jar ../../../../plugins/fancyholograms/release_deployment_config.json

View File

@@ -34,6 +34,8 @@ jobs:
run: ./gradlew :tools:deployment:shadowJar run: ./gradlew :tools:deployment:shadowJar
- name: Deploy - name: Deploy
env:
MODRINTH_API_KEY: ${{ secrets.MODRINTH_API_KEY }}
run: run:
cd tools/deployment/build/libs && cd tools/deployment/build/libs &&
java -jar deployment.jar ../../../../plugins/fancyholograms/snapshot_deployment_config.json java -jar deployment.jar ../../../../plugins/fancyholograms/snapshot_deployment_config.json

View File

@@ -18,7 +18,7 @@
"1.21.3", "1.21.3",
"1.21.4" "1.21.4"
], ],
"channel": "release", "channel": "RELEASE",
"loaders": [ "loaders": [
"paper", "paper",
"folia" "folia"

View File

@@ -18,7 +18,7 @@
"1.21.3", "1.21.3",
"1.21.4" "1.21.4"
], ],
"channel": "alpha", "channel": "ALPHA",
"loaders": [ "loaders": [
"paper", "paper",
"folia" "folia"

View File

@@ -1,20 +0,0 @@
package de.oliver.deployment.modrinth;
import com.google.gson.annotations.SerializedName;
public record CreateVersionRequest(
String name,
@SerializedName("version_number") String versionName,
String changelog,
String[] dependencies,
@SerializedName("game_versions") String[] gameVersions,
@SerializedName("version_type") String versionType,
String[] loaders,
boolean featured,
String status,
@SerializedName("requested_status") String requestedStatus,
@SerializedName("project_id") String projectId,
@SerializedName("file_parts") String[] fileParts,
@SerializedName("primary_file") String primaryFile
) {
}

View File

@@ -45,7 +45,7 @@ public class ModrinthService {
changelog, changelog,
new ArrayList<>(), new ArrayList<>(),
Arrays.asList(config.supportedVersions()), Arrays.asList(config.supportedVersions()),
ProjectVersion.VersionType.ALPHA, ProjectVersion.VersionType.valueOf(config.channel()),
Arrays.asList(config.loaders()), Arrays.asList(config.loaders()),
config.featured(), config.featured(),
config.projectID(), config.projectID(),