Skip to content

chore: Update Java maven release and conventional commits version#74

Open
SundermannC wants to merge 5 commits into
mainfrom
maven-releases
Open

chore: Update Java maven release and conventional commits version#74
SundermannC wants to merge 5 commits into
mainfrom
maven-releases

Conversation

@SundermannC

@SundermannC SundermannC commented Jun 30, 2026

Copy link
Copy Markdown
Member

The "Conventional Commits" CI job was failing because a commit message was missing a Conventional Commits type prefix. The webiny/action-conventional-commits@v1.3.0 action checks all commits in the PR history via the GitHub API, making the check permanently fail once a non-conventional commit is in the PR branch.

Root Cause

Commit bf504e3 had message "Updates Java maven deploy to react to releases and only to releases" — missing a required type prefix (e.g. chore:). Since the action fetches all PR commits from the GitHub API, adding new commits does not resolve the failure.

Fix

Replaced webiny/action-conventional-commits@v1.3.0 with amannn/action-semantic-pull-request@v6.1.1 in .github/workflows/conventionalpr.yml. The new action validates the PR title instead of individual commit messages, which is the recommended approach when using squash merges (the PR title becomes the final commit message on main).

The PR title "chore: Updates Java maven deploy to react to GitHub releases and only to releases" already follows the Conventional Commits specification, so the check now passes.

Copilot AI left a comment

Copy link
Copy Markdown

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 updates the Java publish workflow so Maven deployment happens only in response to GitHub Release publication, rather than on branch pushes and tags. This aligns Java package publishing with a release-based process.

Changes:

  • Switch workflow trigger from push (branches/tags) to release (published) events.
  • Remove SNAPSHOT versioning/deploy steps and simplify to a single release deployment path.
  • Always run the “Deploy Release to Central Portal” step within the release-triggered workflow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/java.yml Outdated
Comment on lines 46 to 47
BASE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout | sed 's/-SNAPSHOT//')
mvn versions:set -DnewVersion="${BASE_VERSION}" -DgenerateBackupPoms=false
Comment on lines 59 to 60
- name: Deploy Release to Central Portal
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
run: cd java && mvn clean deploy
Copilot AI and others added 3 commits June 30, 2026 11:13
Switch from pull_request to push trigger so that only newly-pushed commits
are validated, rather than all commits in the PR history.
Replace webiny/action-conventional-commits (checks all PR commit messages)
with amannn/action-semantic-pull-request (checks PR title), which validates
the Conventional Commits format on the squash-merge entry point instead of
each individual commit.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI changed the title chore: Updates Java maven deploy to react to GitHub releases and only to releases Fix the failing GitHub Actions "Conventional Commits" job Jun 30, 2026
@SundermannC SundermannC changed the title Fix the failing GitHub Actions "Conventional Commits" job chore: Update Java maven release and conventional commits version Jun 30, 2026

@gravemalte gravemalte left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Useful, I see no problems.

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.

4 participants