Add GitHub publishing and CI publishing #195
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR consists of three parts:
1. Configure modpublisher for GitHub Releases
Some recent Modpublisher PRs added support for configuring the github release tag separately from the "version". This allows use to use
1.2.3+mc1.20.4
as our curseforge/modrinth version, while publishing to a GitHub Release tagged asv1.2.3
.Support for marking the Release as "draft" was also added. This has the advantage of allowing a release to be created before the tag exists, without GitHub automatically creating an (unsigned) tag.
Now, running
./gradlew publishMod
will also publish a draft release to GitHub.Currently untested.
2. Auto publish when pushing
+mc*
tagsThis is pretty simple; automatically run
./gradlew publishMod
whenever a tag ending in+mc*
is pushed to one of the release branches (main
and1.*
).Currently untested.
3. Publish GH releases when pushing "canonical" tags
This is still WIP, and may be postponed until a follow up PR.
The concept is simple; set
draft=false
on the github release when a "release tag" gets pushed.However, we may also want to create the release if it doesn't exist yet? Alternatively, we might want a new modpublisher feature where the release is marked
draft
only if the tag doesn't exist yet. firstdarkdev/modpublisher#16Currently WIP & untested.
Extra notes
See Filter pattern cheat sheet, because it turns out the
on
tag/branch/path filters aren't actually globs. It's some weird custom mash-up of regex & glob...