Skip to content

Conversation

@kaikreuzer
Copy link
Member

No description provided.

Signed-off-by: Kai Kreuzer <kai@openhab.org>
@kaikreuzer kaikreuzer requested a review from a team as a code owner October 10, 2025 20:50
@kaikreuzer kaikreuzer requested review from wborn and removed request for a team October 10, 2025 20:51
@wborn wborn requested a review from Copilot October 12, 2025 08:56
Copy link

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 introduces a comprehensive GitHub Actions workflow for automated Maven Central releases of the static-code-analysis project. The workflow handles the complete release lifecycle including version updates, deployment, and preparation for the next development iteration.

Key changes:

  • Automated release process with manual version input parameters
  • Integration with Maven Central via OSSRH and Central Publisher Portal
  • Post-release verification to confirm Maven Central availability

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

git push origin

- name: Create GitHub Release
uses: actions/create-release@v1
Copy link

Copilot AI Oct 12, 2025

Choose a reason for hiding this comment

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

The actions/create-release@v1 action is deprecated. Use softprops/action-gh-release@v1 or the newer gh CLI commands instead for better security and maintenance.

Copilot uses AI. Check for mistakes.
- name: Update parent POM versions in modules
run: |
# Update parent version in all child POMs
for pom in custom-checks/pom.xml custom-checks/checkstyle/pom.xml custom-checks/findbugs/pom.xml custom-checks/pmd/pom.xml sat-extension/pom.xml sat-plugin/pom.xml codestyle/pom.xml; do
Copy link

Copilot AI Oct 12, 2025

Choose a reason for hiding this comment

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

The POM file list is duplicated in two locations. Consider extracting this list to an environment variable or using a find command to avoid duplication and make maintenance easier.

Suggested change
for pom in custom-checks/pom.xml custom-checks/checkstyle/pom.xml custom-checks/findbugs/pom.xml custom-checks/pmd/pom.xml sat-extension/pom.xml sat-plugin/pom.xml codestyle/pom.xml; do
for pom in $(find custom-checks sat-extension sat-plugin codestyle -name pom.xml); do

Copilot uses AI. Check for mistakes.
- name: Update parent POM versions in modules to snapshot
run: |
# Update parent version in all child POMs
for pom in custom-checks/pom.xml custom-checks/checkstyle/pom.xml custom-checks/findbugs/pom.xml custom-checks/pmd/pom.xml sat-extension/pom.xml sat-plugin/pom.xml codestyle/pom.xml; do
Copy link

Copilot AI Oct 12, 2025

Choose a reason for hiding this comment

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

The POM file list is duplicated in two locations. Consider extracting this list to an environment variable or using a find command to avoid duplication and make maintenance easier.

Copilot uses AI. Check for mistakes.
Comment on lines +115 to +122
git add pom.xml
git add custom-checks/pom.xml
git add custom-checks/checkstyle/pom.xml
git add custom-checks/findbugs/pom.xml
git add custom-checks/pmd/pom.xml
git add sat-extension/pom.xml
git add sat-plugin/pom.xml
git add codestyle/pom.xml
Copy link

Copilot AI Oct 12, 2025

Choose a reason for hiding this comment

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

The git add commands for POM files are duplicated. This creates a third instance of the same file list, making maintenance difficult. Consider using git add *.xml **/*.xml or a similar pattern to automatically include all POM files.

Suggested change
git add pom.xml
git add custom-checks/pom.xml
git add custom-checks/checkstyle/pom.xml
git add custom-checks/findbugs/pom.xml
git add custom-checks/pmd/pom.xml
git add sat-extension/pom.xml
git add sat-plugin/pom.xml
git add codestyle/pom.xml
git add **/pom.xml

Copilot uses AI. Check for mistakes.
Comment on lines +152 to +160
# Add all modified POM files
git add pom.xml
git add custom-checks/pom.xml
git add custom-checks/checkstyle/pom.xml
git add custom-checks/findbugs/pom.xml
git add custom-checks/pmd/pom.xml
git add sat-extension/pom.xml
git add sat-plugin/pom.xml
git add codestyle/pom.xml
Copy link

Copilot AI Oct 12, 2025

Choose a reason for hiding this comment

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

The git add commands for POM files are duplicated. This creates a third instance of the same file list, making maintenance difficult. Consider using git add *.xml **/*.xml or a similar pattern to automatically include all POM files.

Copilot uses AI. Check for mistakes.
Copy link
Member

@wborn wborn left a comment

Choose a reason for hiding this comment

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

Looks like a nice way for being able to do SAT releases using GHA! The only improvement I saw is what Copilot also found, i.e. more generically handling POM files. But maybe there are some pom.xml files also used in tests making it less straight forward?

Did you also consider using the maven-release-plugin? It also checks if there are any snapshot dependencies before doing a release. We can always still use that in a follow up PR of course. 😉

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