Skip to content

Commit 7722a8f

Browse files
committed
fix: workflow
1 parent 3897bab commit 7722a8f

File tree

1 file changed

+33
-9
lines changed

1 file changed

+33
-9
lines changed

.github/workflows/release-dev.yml

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ env:
2222
"1.21.1",
2323
"1.21.2",
2424
"1.21.3",
25-
"1.21.4",
26-
"1.21.5"
25+
"1.21.4"
2726
]
2827
2928
jobs:
@@ -67,18 +66,18 @@ jobs:
6766
run: ./gradlew clean build shadowJar
6867

6968
- name: Upload artifacts
70-
uses: actions/upload-artifact@v3
69+
uses: actions/upload-artifact@v4
7170
with:
7271
name: build-artifacts
73-
path: |
74-
platform/*/build/libs/*.jar
72+
path: platform/*/build/libs/*.jar
73+
compression-level: 0
7574

7675
publish-registry:
7776
needs: build
7877
runs-on: ubuntu-latest
7978
steps:
8079
- name: Download artifacts
81-
uses: actions/download-artifact@v3
80+
uses: actions/download-artifact@v4
8281
with:
8382
name: build-artifacts
8483
path: artifacts
@@ -140,6 +139,31 @@ jobs:
140139
-F "platform_versions=${{ env.MINECRAFT_VERSIONS }}" \
141140
"${REGISTRY_URL}/v1/applications/${APP_ID}/releases/${{ needs.build.outputs.gradle_version }}/files"
142141
142+
publish-maven:
143+
needs: build
144+
runs-on: ubuntu-latest
145+
steps:
146+
- name: Checkout repository
147+
uses: actions/checkout@v3
148+
with:
149+
ref: main
150+
151+
- name: Set up JDK 21
152+
uses: actions/setup-java@v3
153+
with:
154+
distribution: 'adopt'
155+
java-version: '21'
156+
157+
- name: Make gradlew executable
158+
run: chmod +x ./gradlew
159+
160+
- name: Publish to SimpleCloud Repository
161+
run: ./gradlew publishMavenJavaPublicationToSimplecloudRepository
162+
env:
163+
COMMIT_HASH: ${{ needs.build.outputs.commit_hash }}
164+
SIMPLECLOUD_USERNAME: ${{ secrets.SIMPLECLOUD_USERNAME }}
165+
SIMPLECLOUD_PASSWORD: ${{ secrets.SIMPLECLOUD_PASSWORD }}
166+
143167
publish-modrinth:
144168
needs: build
145169
runs-on: ubuntu-latest
@@ -156,7 +180,7 @@ jobs:
156180
java-version: '21'
157181

158182
- name: Download artifacts
159-
uses: actions/download-artifact@v3
183+
uses: actions/download-artifact@v4
160184
with:
161185
name: build-artifacts
162186
path: platform
@@ -171,11 +195,11 @@ jobs:
171195
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
172196

173197
create-github-release:
174-
needs: [build, publish-registry, publish-modrinth]
198+
needs: [build, publish-registry, publish-maven, publish-modrinth]
175199
runs-on: ubuntu-latest
176200
steps:
177201
- name: Download artifacts
178-
uses: actions/download-artifact@v3
202+
uses: actions/download-artifact@v4
179203
with:
180204
name: build-artifacts
181205
path: artifacts

0 commit comments

Comments
 (0)