Skip to content

Migrate CI to GitHub Actions and release via GitHub releases - #694

Merged
stephenjust merged 5 commits into
mainfrom
ci/github-actions-build-publish
Nov 9, 2026
Merged

stephenjust merged 5 commits into
mainfrom
ci/github-actions-build-publish

Conversation

@NormalDuck

@NormalDuck NormalDuck commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Why are we doing this?

To get off Azure DevOps: CI moves to GitHub Actions, and published builds move from the XBot Azure Artifacts Maven feed to GitHub releases. Robot projects can then reference the library from GitHub with no tokens or Maven feed.

This supersedes draft #681. That PR's build step passed, but the job failed because EnricoMi/publish-unit-test-result-action@v2 is a Linux-only Docker action running on a Windows runner. #681 also predates Java 25 / GradleRIO 2027.

Whats changing?

  • Removed azure-pipelines.yml; added .github/workflows/build.yml. It runs on PRs to main, pushes to main, and manual dispatch.
    • Java 25 (Temurin) on windows-latest, same as the Azure job
    • ./gradlew build covers compile, Spotless, Checkstyle, tests, and JaCoCo
    • JUnit results are published via the Windows variant of the test-result action
    • JaCoCo report and Javadoc are uploaded as workflow artifacts. These are for browsing and expire after 14 days; they are not used as dependencies.
    • gradle/actions/setup-gradle replaces the Azure Cache@2 step. Only main writes the cache.
  • Releases (push to main only): each merge creates a GitHub release.
    • Tag and version are yyyyMMdd.HHmmss (UTC), so they sort after the old Azure versions (yyyyMMdd.N).
    • Attached: SeriouslyCommonLib-<ver>.jar, -sources.jar, -javadoc.jar, and .pom.
    • Release notes are auto-generated.
  • build.gradle:
    • Removed the Azure feed as a publish target.
    • Removed the net.linguica.maven-settings plugin. It only supplied Azure credentials, and it also broke CI: it treats the ${env.GITHUB_TOKEN} placeholder in setup-java's generated settings.xml as an encrypted password.
    • publishToMavenLocal still works.
  • README: new "Using SeriouslyCommonLib in a robot project" section; release badge replaces the Azure badges. AGENTS.md updated.

Robot projects

Replace the Azure feed maven { ... } block with:

ivy {
    name = 'SeriouslyCommonLibReleases'
    url = 'https://github.com/Team488/SeriouslyCommonLib/releases/download/'
    patternLayout { artifact '[revision]/[module]-[revision](-[classifier]).[ext]' }
    metadataSources { artifact() }
    content { includeGroup 'xbot.common' }
}

The xbot.common:SeriouslyCommonLib:<version> coordinates and the includeBuild('../SeriouslyCommonLib') composite-build setup are unchanged.

Notes:

  • Versions must be pinned exactly; + doesn't work against release URLs. TeamXbot2026, FRCRobotTemplate, and XbotEdu already pin.
  • The current POM declares no dependencies (it publishes artifact jar, not components.java), so nothing is lost by resolving the bare jar.
  • Existing versions remain on the Azure feed until a project switches over.

Questions/notes for reviewers

  • No secrets are needed. The workflow uses GITHUB_TOKEN with contents: write.
  • After merging, disable the Azure Pipelines definition in Azure DevOps.
  • Release creation only runs on main, so the first real release happens on merge.

How this was tested

  • unit tests added
  • tested on robot
  • CI on this PR covers build, tests, test report, and Javadoc.
  • Locally (Java 25): ran the release step's Gradle tasks, which produced the 4 assets and a POM with the right version.
  • Verified the Ivy block above resolves a jar from a release-layout directory.
  • Verified Gradle follows GitHub release download redirects, using a public google-java-format release.

🤖 Generated with Claude Code

Replace azure-pipelines.yml with .github/workflows/build.yml:
- Build, test, Spotless, Checkstyle and JaCoCo on Java 25 (windows-latest)
- Publish JUnit results with the Windows variant of the test-result action
  (the default variant is a Linux-only Docker action, which broke #681)
- Upload JaCoCo and Javadoc as artifacts
- On pushes to main, publish to the existing XBot Azure Artifacts Maven feed
  using the AZURE_ARTIFACTS_TOKEN secret, with yyyyMMdd.HHmmss versions so
  new builds sort after the existing yyyyMMdd.N ones

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@NormalDuck
NormalDuck requested a review from a team as a code owner November 7, 2026 22:14
@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

JUnit results

 72 files   72 suites   5s ⏱️
443 tests 439 ✅ 4 💤 0 ❌
468 runs  464 ✅ 4 💤 0 ❌

Results for commit 66d98f6.

♻️ This comment has been updated with latest results.

NormalDuck and others added 3 commits November 7, 2026 14:17
The generated settings.xml uses ${env.GITHUB_TOKEN}, which the
maven-settings plugin treats as an encrypted password and fails
project configuration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
overwrite-settings: false still creates the file when none exists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each push to main now creates a GitHub release tagged with the version
(yyyyMMdd.HHmmss) with the jar, sources, javadoc and POM attached. Robot
projects resolve the jar directly from the release URL via an Ivy pattern
repository (see README), with no credentials needed.

Drops Azure feed publishing, the AZURE_ARTIFACTS_TOKEN secret, and the
net.linguica.maven-settings plugin (only used for Azure credentials, and
the cause of the setup-java settings.xml failure).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@NormalDuck NormalDuck changed the title Migrate CI from Azure Pipelines to GitHub Actions Migrate CI to GitHub Actions and release via GitHub releases Nov 7, 2026
@NormalDuck

Copy link
Copy Markdown
Contributor Author

Follow-up PRs that point robot projects at the new GitHub releases (safe to merge before this one; they keep the Azure feed for the currently pinned versions):

After this PR merges and the first release exists, each project can bump SeriouslyCommonLibVersion to a release tag and drop its Azure feed block.

@NormalDuck
NormalDuck requested a review from aschokking November 7, 2026 22:42
@NormalDuck
NormalDuck enabled auto-merge (squash) November 7, 2026 22:42

@aschokking aschokking left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks reasonable, and we can always revert if something goes wrong

@stephenjust
stephenjust disabled auto-merge November 9, 2026 02:01
@stephenjust
stephenjust merged commit 3adbc10 into main Nov 9, 2026
2 checks passed
@stephenjust
stephenjust deleted the ci/github-actions-build-publish branch November 9, 2026 02:01
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.

3 participants