Skip to content

Conversation

@thomasturrell
Copy link
Contributor

@thomasturrell thomasturrell commented Nov 25, 2025

What

Amends GitHub Actions workflow (.github/workflows/release.yml) to fully automate creating a release from a GitHub draft release and deploying artifacts to Maven Central using the Maven Release Plugin.

Why

Automates the repetitive release steps (version bump, tag, build, sign, deploy) to reduce human error and streamline release process.
Ensures consistent release tagging (vX.Y.Z), artifact upload, and publishing of the GitHub Release.

Key behaviour / highlights

  1. Trigger: runs when a GitHub release is created, but only proceeds for draft releases.
  2. Validates release tag follows vX.Y.Z format and extracts version.
  3. Determines the originating branch (target_commitish) and falls back to main if missing or a SHA.
  4. Uses a GitHub App token for repository push and release updates (actions/create-github-app-token).
  5. Checks remote to ensure tag does not already exist before proceeding.
  6. Sets up Java (Temurin JDK 25) with Maven caching and configures Maven server credentials and GPG signing.
  7. Runs ./mvnw release:prepare and release:perform limited to the xapi-model, xapi-client, and xapi-model-spring-boot-starter modules.
  8. Pushes release commit(s) back to the originating branch; attempts fast-forward push and uses a merge fallback when needed. Detects and fails on merge conflicts and suggests remediation.
  9. Collects built artifacts and uploads them to the GitHub release using gh release upload.
  10. Publishes the draft release (marks draft=false) after successful artifact upload.

Files changed

.github/workflows/release.yml

Removed version specification for spring-boot-jackson2 dependency.
Updated release workflow to improve tag handling and version validation.
Copilot AI review requested due to automatic review settings November 25, 2025 15:34
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves the automated release workflow by adding support for draft releases, implementing safer tag handling with duplicate detection, and adding merge fallback logic for concurrent branch updates.

  • Enhances the release process to work specifically with draft releases that get published upon completion
  • Adds intelligent tag handling that detects and handles already-processed releases
  • Implements merge fallback strategy when fast-forward push fails due to concurrent changes

Copy link
Contributor

Copilot AI commented Nov 25, 2025

@thomasturrell I've opened a new pull request, #428, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Contributor

Copilot AI commented Nov 25, 2025

@thomasturrell I've opened a new pull request, #429, to work on those changes. Once the pull request is ready, I'll request review from you.

@thomasturrell
Copy link
Contributor Author

@copilot fix up the title and description of this PR

Copy link
Contributor

Copilot AI commented Nov 25, 2025

@thomasturrell I've opened a new pull request, #430, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Contributor Author

@thomasturrell thomasturrell left a comment

Choose a reason for hiding this comment

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

See comments attempt to resolve in separate pr

Copy link
Contributor

Copilot AI commented Nov 25, 2025

@thomasturrell I've opened a new pull request, #431, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 7 comments.

@thomasturrell thomasturrell changed the title Improve release process Add Automated Release workflow: prepare/perform Maven releases and publish draft releases Nov 26, 2025
thomasturrell and others added 3 commits November 26, 2025 00:08
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@sonarqubecloud
Copy link

@thomasturrell thomasturrell merged commit 77126b8 into main Nov 26, 2025
4 checks passed
@thomasturrell thomasturrell deleted the thomasturrell-patch-3 branch November 26, 2025 00:28
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