Workflow and Gradle based publishing setup with changelog system#3575
Conversation
|
Is this ready? Once it is, I would like Jelly and IMS to also review this, and then it would be nice if we could try it out for Sodium 0.8.10, which is an upcoming bugfix release. |
Mostly yes, it just needs to be tested and when this is merged 2 secrets for the curseforge and modrinth api keys will need to be added |
|
You can mark the PR as ready for review when you think it's complete and correct. Thanks for the work so far! |
# Conflicts: # buildSrc/src/main/kotlin/BuildConfig.kt
jellysquid3
left a comment
There was a problem hiding this comment.
The workflow file needs to be updated so that it runs on the restricted prod environment, otherwise it can't obtain the access tokens during build.
There is a current example of this here.
|
Related, but not blocking: #2174 This greatly reduces the risks of malicious code getting into the CI/CD and gaining access to the credentials. |
Already does that over here https://github.com/CaffeineMC/sodium/pull/3575/changes#diff-232ead425069ad86b523a739aa18b77f9088cd61a4b40c6a374d9774ff78cfc8L13-L14 |
|
Oh, OK. Somehow I missed that. |
|
If you want to fix the publish order of Fabric and NeoForge, you need to write the code accordingly. If you run a dry run, you will see that the order is not guaranteed. If this does not bother you, you can ignore my opinion. |
|
I think the publish order doesn't have any significant importance to us, thanks for pointing it out though. Since we've approved it, do we need to insert the API keys into the GH Actions before we merge this? |
|
API keys are required when running this workflow. |
|
Closes: #3404 |
|
The production environment has been modified on the organizational side to supply the expected tokens now. |
It would be nice if Modrinth/CurseForge didn't randomly shuffle the order between NeoForge and Fabric updates, though. How difficult is it to prevent this? |
I use it like this. (full code) val publishTasks = tasks.withType<me.modmuss50.mpp.PublishModTask>()
val fabricPublishTasks = publishTasks.matching { it.platform.name.contains("fabric", ignoreCase = true) }
publishTasks.matching { it.platform.name.contains("neoforge", ignoreCase = true) }.configureEach {
mustRunAfter(fabricPublishTasks)
} |
|
Merging as the ordering thing isn't blocking. @IThundxr can maybe look into it in a follow-up. |
Implements automatic publishing trigged by running a workflow, and then using "me.modmuss50.mod-publish-plugin" on the gradle side of things
For this to actually work some things need to be done:
CURSEFORGE_API_KEYneeds to be added to the repo secrets and set to a curseforge api key from a user with write perms for the sodium curseforgeMODRINTH_API_KEYsame as above, but modrinth, the token should have the permissions "Read User Data" and "Create versions"CHANGELOG.mdneeds to be filled out before making a release, instructions are included inside on how to use it