Files
claude-code add607cc3d
werkator build succeeded after 02:41
werkator/publish build succeeded after 00:19
werkator/mutation build succeeded after 00:33
The version and the changelog follow from the PR documents (#70)
Co-authored-by: claude-code <claude-code@javagil.de>
2026-10-14 21:19:06 +02:00

2.1 KiB

Publishing

werkcrappit is published to the Maven registry of git.javagil.de:

https://git.javagil.de/api/packages/mi/maven

Both modules and the Gradle plugin marker go there, so a build can resolve the Gradle plugin de.javagil.werkcrappit and the PIT plugin de.javagil.werkcrappit:werkcrappit-pit from it.

Versions

The build derives the version from the PR documents: the base version 0.26.14, raised by each PR document merged after it. A branch without a PR document fails checkPrDocument, since its merge would keep the version. ./gradlew changelog writes the release notes of the PR documents and the entries of CHANGELOG.md up to 0.26.14 into build/changelog/CHANGELOG.md. A version is uploaded once and never replaced: the registry refuses a second upload. tools/publish therefore asks the registry first and does nothing when the version is there already, so a re-run of the same main build stays green.

Who publishes

The Werkator build publish runs tools/publish after every green build of main. It is split like Werkator's own deployment:

  • the repository's half in the committed .werkator.yml: the command;
  • the host's half in .git/werkator/.werkator.yml of the clone on mih09: the trigger, the status context and the token.

A branch can neither add the trigger nor read the token, since host-authored triggers are pinned and the token exists only in the host's file.

Host configuration (mih09)

Create a Gitea access token with the scope package: Read and Write for the user that owns the packages. Add this to /home/pacs/mih09/users/werkator/werkcrappit/.git/werkator/.werkator.yml (mode 600):

builds:
  publish:
    trigger:
      afterSuccessOf: default
      branches: ["main"]
    statusContext: werkator/publish
    werkdock:
      env:
        GITEA_PACKAGES_TOKEN: "<token>"

The sandbox shares the host's network, so the build reaches the registry.

Publishing by hand

GITEA_PACKAGES_TOKEN=<token> tools/publish

Without a token, ./gradlew publishToMavenLocal puts everything into ~/.m2 for a local trial.