Skip to content

[WIP] autopublish version-bump pushes#354

Draft
MattSturgeon wants to merge 13 commits intoMinecraftFreecam:stonecutterfrom
MattSturgeon:stonecutter-release
Draft

[WIP] autopublish version-bump pushes#354
MattSturgeon wants to merge 13 commits intoMinecraftFreecam:stonecutterfrom
MattSturgeon:stonecutter-release

Conversation

@MattSturgeon
Copy link
Member

@MattSturgeon MattSturgeon commented Jan 30, 2026

High level concept: when main is pushed to, check whether it's current version has a release associated with it. If not, publish one.

  • For simplicity, this is integrated into the existing build.yaml workflow.
  • During the prepare job, if the event is a push to main, we check if a github release is published for the current version.
  • The actual build runs in a matrix and uploads workflow artifacts.
  • Additionally, the matrix concurrently builds :publish.
    • :publish builds a jar from kotlin sources and generated release-publishing metadata.
    • The JAR will be responsible for publishing, if the current version is unreleased.
    • :generateReleaseMetadata is a rootProject task that outputs release metadata, such as the changelog.
    • Additionally, it aggregates loader-projects' :generateReleaseMetadata tasks. These represent version-specific info, like "dependency relationships", MC version, supported loader.
    • The rootProject task collects the loader-project' outputs and embeds it within its own output as the versions array.
  • After the build, if prepare determined a release is needed, a publish job downloads all workflow artifacts and publishes them.
    • The :publish tarball is also downloaded as an artifact, but not itself published.
    • Instead, it is extracted and installed onto the CI workflow's PATH.
    • It then reads its embedded metadata json and publishes artifacts to GitHub, Curseforge, & Modrinth (or does a dry-run for PRs).
    • WIP

The release workflow will be:

  1. Decide we need a release
  2. Bump the version in gradle.properties
    • Optionally, using :bumpVersion
  3. Patch the changelog using :patchChangelog
  4. Make a commit
  5. Make a PR
  6. CI validates changelog corresponds to version
  7. Merge PR
  8. CI builds & releases automatically
  9. If publishing failed, CI will try again next push, because "main branch version is newer version than latest release" will be unchanged.

TODO:

  • Drop modpublisher
  • GitHub workflow
  • Generate release metadata
  • Base publisher
  • GitHub publisher impl (mostly done)
  • Modrinth publisher impl
  • Curseforge publisher impl

@MattSturgeon MattSturgeon force-pushed the stonecutter-release branch 3 times, most recently from 43f4b61 to cfbc943 Compare February 27, 2026 13:46
@MattSturgeon MattSturgeon force-pushed the stonecutter-release branch 4 times, most recently from 9091fdd to 1ad63f8 Compare March 4, 2026 12:35
Move the plugin-stub to a separate Gradle project to avoid
:build-logic:api from depending on Gradle API.
Will be replaced by a separate publishing exe.
- kotlin-test
- kotest-assertions
- mockk
Will be used to export release-related metadata, which CI will use when
publishing release artifacts.

A rootProject task defines invariants and aggregates metadata from each subproject.
CLI parsing and command runner.
Kotlin `:publish` project, produces a JVM jar archive which can be run
by CI to publish the current Freecam version to GitHub, Modrinth, etc.
- Check whether the current version is released
- Build the publisher
- Run it if needed
@MattSturgeon MattSturgeon force-pushed the stonecutter-release branch from 1ad63f8 to 6190805 Compare March 4, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant