Skip to content

Commit 433c998

Browse files
ZoriotAuroraLS3
andauthored
Fix and modernize Curseforge Publishing (#4778)
* fix: Fix Curseforge publishing with changing to mc-publish Curseforge now needs an environment setted which curseforge-upload doesn't support because it's not maintained anymore. Alternatively that could also be merged into Modrinth Upload - Fabric. Kira-NT/mc-publish#170 Fixes #4752. * chore: Update actions * chore: Add Zoriot to Contributers * Apply suggestions from code review Co-authored-by: Aurora Lahtela <24460436+AuroraLS3@users.noreply.github.com> --------- Co-authored-by: Aurora Lahtela <24460436+AuroraLS3@users.noreply.github.com>
1 parent 60a4add commit 433c998

2 files changed

Lines changed: 23 additions & 34 deletions

File tree

.github/workflows/on-release.yml

Lines changed: 21 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout 🛎️
13-
uses: actions/checkout@v6
13+
uses: actions/checkout@v7
1414
- name: Get Download URL
1515
run: |
1616
curl 'https://api.github.com/repos/plan-player-analytics/plan/releases/${{ github.event.release.id }}/assets' | jq -r '.[] | {name: .name, url: .browser_download_url} | select(.url | strings | test("Fabric") | not)' > asset.txt
@@ -32,7 +32,7 @@ jobs:
3232
uses: EndBug/add-and-commit@v10
3333
with:
3434
committer_name: GitHub Actions
35-
committer_email: 41898282+github-actions[bot]@users.noreply.github.com
35+
committer_email: 41898282+github-actions[bot]@users.noreply.github.action
3636
message: Update versions.txt ${{ github.event.release.name }}
3737
add: versions.txt
3838
push: origin HEAD:master
@@ -43,7 +43,7 @@ jobs:
4343

4444
steps:
4545
- name: Checkout 🛎️
46-
uses: actions/checkout@v6
46+
uses: actions/checkout@v7
4747
- name: Get git TAG
4848
id: tagName
4949
uses: olegtarasov/get-tag@v2.1
@@ -65,7 +65,7 @@ jobs:
6565
runs-on: ubuntu-latest
6666
steps:
6767
- name: Checkout 🛎️
68-
uses: actions/checkout@v6
68+
uses: actions/checkout@v7
6969
with:
7070
fetch-depth: 0
7171
- name: Download release artifact for upload
@@ -103,41 +103,29 @@ jobs:
103103
jq -r '.name' asset.txt > name.txt
104104
wget -i url.txt
105105
echo "JAR_FILENAME=$(cat name.txt)" >> $GITHUB_ENV
106-
- name: Upload release to CurseForge 🚀
107-
if: ${{ github.event.release.prerelease == false }}
108-
uses: itsmeow/curseforge-upload@master
106+
- name: CurseForge Upload - Fabric 🚀
107+
uses: Kira-NT/mc-publish@v3
109108
with:
110-
token: ${{ secrets.CF_API_TOKEN }}
111-
project_id: 508727
112-
game_endpoint: minecraft
113-
file_path: ${{ env.JAR_FILENAME }}
114-
changelog: ${{ github.event.release.body }}
115-
changelog_type: markdown
116-
display_name: ${{ github.event.release.name }}
117-
game_versions: "2:Java 25,86297:26-2,68441:Fabric"
118-
release_type: release
119-
relations: fabric-api:requiredDependency,luckperms:optionalDependency
120-
- name: Upload prerelease to CurseForge 🚀
121-
if: ${{ github.event.release.prerelease == true }}
122-
uses: itsmeow/curseforge-upload@master
123-
with:
124-
token: ${{ secrets.CF_API_TOKEN }}
125-
project_id: 508727
126-
game_endpoint: minecraft
127-
file_path: ${{ env.JAR_FILENAME }}
109+
curseforge-id: 508727
110+
curseforge-token: ${{ secrets.CF_API_TOKEN }}
111+
files: ${{ env.JAR_FILENAME }}
112+
name: ${{ github.event.release.name }}
128113
changelog: ${{ github.event.release.body }}
129-
changelog_type: markdown
130-
display_name: ${{ github.event.release.name }}
131-
game_versions: "2:Java 25,86297:26-2,68441:Fabric"
132-
release_type: beta
133-
relations: fabric-api:requiredDependency,luckperms:optionalDependency
114+
loaders: fabric
115+
game-versions: |
116+
>=26.2
117+
version-type: ${{ github.event.release.prerelease && 'beta' || 'release' }}
118+
dependencies: |
119+
fabric-api(required){curseforge:306612}
120+
luckperms(optional){curseforge:431733}
121+
java: 25
134122

135123
upload_release_hangar:
136124
name: Hangar Upload
137125
runs-on: ubuntu-latest
138126
steps:
139127
- name: 📥 Checkout git repository
140-
uses: actions/checkout@v6
128+
uses: actions/checkout@v7
141129
with:
142130
fetch-depth: 0
143131
- name: ⚙ Get Download URL
@@ -192,7 +180,7 @@ jobs:
192180
echo "FABRIC_JAR=$(cat name_fabric.txt)" >> $GITHUB_ENV
193181
194182
- name: Modrinth Upload - Plugin 🚀
195-
uses: Kira-NT/mc-publish@v3.3
183+
uses: Kira-NT/mc-publish@v3
196184
with:
197185
modrinth-id: wJQfHhxh
198186
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
@@ -216,7 +204,7 @@ jobs:
216204
version-type: ${{ github.event.release.prerelease && 'beta' || 'release' }}
217205

218206
- name: Modrinth Upload - Fabric 🚀
219-
uses: Kira-NT/mc-publish@v3.3
207+
uses: Kira-NT/mc-publish@v3
220208
with:
221209
modrinth-id: plan
222210
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}

Plan/common/src/main/java/com/djrapitops/plan/delivery/rendering/html/Contributors.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ public class Contributors {
120120
new Contributor("YannicHock", CODE),
121121
new Contributor("SaolGhra", CODE),
122122
new Contributor("Jsinco", CODE),
123-
new Contributor("julianvdhogen", LANG)
123+
new Contributor("julianvdhogen", LANG),
124+
new Contributor("Zoriot", CODE),
124125
};
125126

126127
private Contributors() {

0 commit comments

Comments
 (0)