Skip to content

Add GitHub Actions build and GitHub Packages release - #30

Draft
shannah wants to merge 4 commits into
masterfrom
claude/coderad-llm-benefits-cmthi3
Draft

shannah wants to merge 4 commits into
masterfrom
claude/coderad-llm-benefits-cmthi3

Conversation

@shannah

@shannah shannah commented Sep 26, 2026 •

Copy link
Copy Markdown
Owner

CodeRAD had no CI, and releases were deployed by hand to the legacy Sonatype OSSRH endpoint. This adds CI, and a tag-driven release to GitHub Packages. Maven Central publishing is left for later.

Workflows

  • .github/workflows/build.yml: runs xvfb-run -a mvn -B install on JDK 8, 17 and 21 for pushes to master, for PRs, and on manual dispatch. The JDK 21 leg would have caught the annotation-processor NPE fixed in Fix annotation processing on JDK 21 and stray Processor service file #29. xvfb-run is needed because the Codename One test runner in tests/javase starts the JavaSE port, which needs a display.
  • .github/workflows/release.yml: runs on v* tags, which update-version.sh already creates. It fails if the tag doesn't match the project version. Otherwise it runs mvn deploy to GitHub Packages with -DaltDeploymentRepository and the built-in GITHUB_TOKEN, so no secrets are needed.

Release steps:

bash update-version.sh 2.0.7
git push origin master v2.0.7
bash update-version.sh 2.0.8-SNAPSHOT && git push origin master

Build changes needed for a clean runner

  • pom.xml: builds against the released Codename One 7.0.273 instead of 8.0-SNAPSHOT, which only existed in a local Codename One build. It also adds https://repo.codenameone.com/maven2 (repository and plugin repository, releases only), because Codename One releases are published there rather than to Maven Central.
  • tests/pom.xml: no longer pins Codename One 7.0.22. It now inherits the parent's version. The 7.0.22 plugin's compliance-check needs ~/.codenameone/CodeNameOneBuildClient.jar to already exist, so it failed on a fresh runner (first CI run, JDK 21 job).
  • annotations/pom.xml: compiles for Java 8 instead of 1.7. JDK 21's javac no longer supports 1.7, and every other module already targets 8.
  • distributionManagement (the old oss.sonatype.org settings) is unchanged, ready for the Maven Central setup.

Verification

Workflow commands were run locally from an empty Maven repository and an empty home directory, with no custom settings.xml:

  • Build: xvfb-run -a mvn -B install gives BUILD SUCCESS on JDK 8 and 21. JDK 17 passed before the tests/pom.xml change. The cn1:test goal reports "All tests passed. Total 3 tests passed".
  • Release version check: the help:evaluate expression returns 2.0.7-SNAPSHOT.
  • Deploy: mvn deploy -DaltDeploymentRepository=github::default::file://… deployed all 13 modules. The id::default::url form is used because annotations and coderad-annotation-processor pin maven-deploy-plugin 2.8.2.
  • Lint: actionlint finds no problems in either workflow.

Note for consumers: GitHub Packages requires authentication even for public Maven packages, so users need a GitHub token in their settings.xml to resolve releases from there.

🤖 Generated with Claude Code

https://claude.ai/code/session_01U1nqukudLDu9Qix74WZruV

- build.yml: mvn install on JDK 8, 17 and 21 for pushes to master and PRs.
- release.yml: on a v* tag (as created by update-version.sh), check the tag
  matches the project version and deploy to GitHub Packages via
  -DaltDeploymentRepository. distributionManagement is left as is for a later
  Maven Central setup.
- Build against the released Codename One 7.0.273 instead of 8.0-SNAPSHOT, which
  only exists in a local Codename One build, and add repo.codenameone.com where
  Codename One releases are published, so a clean runner can resolve it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U1nqukudLDu9Qix74WZruV
The Codename One test runner in tests/javase starts the JavaSE port, which
needs a display; with java.awt.headless it fails before any test runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U1nqukudLDu9Qix74WZruV
…format

- annotations targeted Java 1.7, which JDK 21's javac no longer supports; every
  other module already targets 8.
- Use the id::layout::url form of -DaltDeploymentRepository: annotations and the
  processor pin maven-deploy-plugin 2.8.2, which only accepts that form (3.x
  accepts it too).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U1nqukudLDu9Qix74WZruV
tests/pom.xml pinned codenameone-maven-plugin 7.0.22, whose compliance-check
needs ~/.codenameone/CodeNameOneBuildClient.jar to already exist, so it failed on
a fresh CI runner. Inheriting 7.0.273 from the parent removes that requirement.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U1nqukudLDu9Qix74WZruV

This branch has not been deployed

No deployments
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.

2 participants