Skip to content

ci: publish a rolling dev prerelease from main - #96

Merged
dmccoystephenson merged 1 commit into
mainfrom
feat/dev-release-workflow
Aug 10, 2026
Merged

ci: publish a rolling dev prerelease from main#96
dmccoystephenson merged 1 commit into
mainfrom
feat/dev-release-workflow

Conversation

@dmccoystephenson

Copy link
Copy Markdown
Member

Part of the rollout behind Dan's Plugin Manager's experimental release channel. DPM can now install main-branch builds with /dpm get mailboxes --experimental, which reads releases/tags/dev — but nothing in this organisation publishes such a release yet, so there is currently nothing for that command to download. This workflow publishes it.

What it does

On every push to main that touches something other than documentation, the JAR is rebuilt and republished as a prerelease tagged dev. Because it is marked as a prerelease, GitHub's "latest release" is unaffected and plugins on the stable channel see no change.

Notes on the approach

  • The build steps mirror release.yml deliberately (Maven, same JDK, same artifact path). If the release build changes, this file has to change with it — a comment at the top says so.
  • The release is deleted and recreated rather than edited. Editing a published release does not move its tag to the new commit, and DPM derives each build's version identity from the release's target_commitish. Recreating it with --target "$GITHUB_SHA" is what makes dev-<short sha> change from build to build; without it every build would look identical and DPM would report "already up to date" forever. A concurrency group prevents two runs overlapping on that delete-and-recreate, and queues rather than cancels, since a cancelled run could leave the repository with no dev release at all.
  • Exactly one JAR is asserted before publishing. DPM installs the first .jar asset it finds on the release, so a release carrying two JARs would leave the installed build depending on asset order. An empty or ambiguous glob match now fails the run instead.
  • Documentation-only merges are skipped, since they produce an identical JAR and would only add a release notification for every watcher.
  • Forks are excluded by a repository guard.

Verification

The same workflow was merged to Medieval-Factions first and confirmed end to end: the published release returned a 40-character commit sha in target_commitish, DPM's parser turned it into dev-cc688da, the JAR downloaded anonymously over HTTP 200 with no token, and releases/latest still returned the real release rather than the prerelease.

The first run of this workflow will be visible on main immediately after merge.


drafted by Claude on behalf of Daniel Stephenson

Adds dev-release.yml, which rebuilds the JAR on every non-documentation push
to main and republishes it as the `dev` prerelease.

This is what Dan's Plugin Manager's experimental release channel reads:
/dpm get mailboxes --experimental fetches releases/tags/dev, so without a
workflow like this there is nothing for it to download.

The build steps mirror release.yml deliberately. The publish step deletes and
recreates the release because editing a published release does not move its tag
to the new commit; a concurrency group keeps two runs from overlapping on that
delete-and-recreate, and the JAR count is asserted because DPM installs the
first .jar asset it finds.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@dmccoystephenson
dmccoystephenson merged commit 26389a1 into main Aug 10, 2026
2 checks passed
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