Skip to content

Commit 34dfb30

Browse files
committed
fix: platform versions (hopefully)
1 parent 819585e commit 34dfb30

File tree

2 files changed

+27
-10
lines changed

2 files changed

+27
-10
lines changed

.github/workflows/release-dev.yml

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,20 @@ on:
99
env:
1010
APP_SLUG: cloud-api-plugin
1111
REGISTRY_URL: https://registry.simplecloud.app
12-
MINECRAFT_VERSIONS: '["1.20","1.20.1","1.20.2","1.20.3","1.20.4","1.20.5","1.20.6","1.21","1.21.1","1.21.2","1.21.3","1.21.4","1.21.5"]'
12+
MINECRAFT_VERSIONS: |
13+
1.20
14+
1.20.1
15+
1.20.2
16+
1.20.3
17+
1.20.4
18+
1.20.5
19+
1.20.6
20+
1.21
21+
1.21.1
22+
1.21.2
23+
1.21.3
24+
1.21.4
25+
1.21.5
1326
1427
jobs:
1528
build:
@@ -100,6 +113,10 @@ jobs:
100113
101114
- name: Upload to Registry
102115
run: |
116+
# Convert newline-separated versions into simple JSON array
117+
PLATFORM_VERSIONS=$(echo "$MINECRAFT_VERSIONS" | jq -R -s 'split("\n") | map(select(length > 0))')
118+
echo "Using platform versions: $PLATFORM_VERSIONS"
119+
103120
# Upload Spigot Platform
104121
SPIGOT_URL="${REGISTRY_URL}/v1/applications/${APP_ID}/releases/${{ needs.build.outputs.gradle_version }}/files"
105122
echo "Uploading Spigot to: $SPIGOT_URL"
@@ -108,14 +125,14 @@ jobs:
108125
echo "Form data:"
109126
echo " platform: minecraft_plugin"
110127
echo " arch: spigot"
111-
echo " platform_versions: ${{ env.MINECRAFT_VERSIONS }}"
128+
echo " platform_versions: $PLATFORM_VERSIONS"
112129
curl -X POST \
113130
-H "Authorization: Bearer ${{ secrets.REGISTRY_TOKEN }}" \
114131
-H "Content-Type: multipart/form-data" \
115132
-F "file=@artifacts/spigot.jar" \
116133
-F "platform=minecraft_plugin" \
117134
-F "arch=spigot" \
118-
-F "platform_versions=${{ env.MINECRAFT_VERSIONS }}" \
135+
-F "platform_versions=$PLATFORM_VERSIONS" \
119136
"$SPIGOT_URL"
120137
121138
# Upload Paper Platform (same jar as Spigot)
@@ -126,14 +143,14 @@ jobs:
126143
echo "Form data:"
127144
echo " platform: minecraft_plugin"
128145
echo " arch: paper"
129-
echo " platform_versions: ${{ env.MINECRAFT_VERSIONS }}"
146+
echo " platform_versions: $PLATFORM_VERSIONS"
130147
curl -X POST \
131148
-H "Authorization: Bearer ${{ secrets.REGISTRY_TOKEN }}" \
132149
-H "Content-Type: multipart/form-data" \
133150
-F "file=@artifacts/spigot.jar" \
134151
-F "platform=minecraft_plugin" \
135152
-F "arch=paper" \
136-
-F "platform_versions=${{ env.MINECRAFT_VERSIONS }}" \
153+
-F "platform_versions=$PLATFORM_VERSIONS" \
137154
"$PAPER_URL"
138155
139156
# Upload BungeeCord Platform
@@ -144,14 +161,14 @@ jobs:
144161
echo "Form data:"
145162
echo " platform: minecraft_plugin"
146163
echo " arch: bungeecord"
147-
echo " platform_versions: ${{ env.MINECRAFT_VERSIONS }}"
164+
echo " platform_versions: $PLATFORM_VERSIONS"
148165
curl -X POST \
149166
-H "Authorization: Bearer ${{ secrets.REGISTRY_TOKEN }}" \
150167
-H "Content-Type: multipart/form-data" \
151168
-F "file=@artifacts/bungeecord.jar" \
152169
-F "platform=minecraft_plugin" \
153170
-F "arch=bungeecord" \
154-
-F "platform_versions=${{ env.MINECRAFT_VERSIONS }}" \
171+
-F "platform_versions=$PLATFORM_VERSIONS" \
155172
"$BUNGEE_URL"
156173
157174
# Upload Velocity Platform
@@ -162,14 +179,14 @@ jobs:
162179
echo "Form data:"
163180
echo " platform: minecraft_plugin"
164181
echo " arch: velocity"
165-
echo " platform_versions: ${{ env.MINECRAFT_VERSIONS }}"
182+
echo " platform_versions: $PLATFORM_VERSIONS"
166183
curl -X POST \
167184
-H "Authorization: Bearer ${{ secrets.REGISTRY_TOKEN }}" \
168185
-H "Content-Type: multipart/form-data" \
169186
-F "file=@artifacts/velocity.jar" \
170187
-F "platform=minecraft_plugin" \
171188
-F "arch=velocity" \
172-
-F "platform_versions=${{ env.MINECRAFT_VERSIONS }}" \
189+
-F "platform_versions=$PLATFORM_VERSIONS" \
173190
"$VELOCITY_URL"
174191
175192
echo "All uploads completed"

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ plugins {
99
`maven-publish`
1010
}
1111

12-
val baseVersion = "0.0.2"
12+
val baseVersion = "0.0.3"
1313
val commitHash = System.getenv("COMMIT_HASH")
1414
val timestamp = System.currentTimeMillis() // Temporary to be able to build and publish directly out of fix branch with same commit hash
1515
val snapshotVersion = "${baseVersion}-dev.${timestamp}-${commitHash}"

0 commit comments

Comments
 (0)