Skip to content

Conversation

@kaikreuzer
Copy link
Member

No description provided.

@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.
Copy link
Member Author

Choose a reason for hiding this comment

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

@copilot open a new pull request to apply changes based on this feedback

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. 😉

Copy link

Copilot AI commented Dec 5, 2025

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

Copy link

Copilot AI commented Dec 5, 2025

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

@kaikreuzer
Copy link
Member Author

Did you also consider using the maven-release-plugin?

No, I didn't.

We can always still use that in a follow up PR of course. 😉

Yeah, feel free!

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

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


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

@holgerfriedrich holgerfriedrich mentioned this pull request Dec 5, 2025
@holgerfriedrich
Copy link
Member

@kaikreuzer do you want to start the publishing without further measures (no dry-run or approval of the created binary?) I know this is not that easy as the version plugin changes the git.

You could also consider using actions/upload to upload the build artifact to GH - in case sonatype upload fails, it could be useful to have it at hand.

Copy link

Copilot AI commented Dec 5, 2025

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

@kaikreuzer
Copy link
Member Author

do you want to start the publishing without further measures (no dry-run or approval of the created binary?)

@holgerfriedrich What would be your suggestion? I'm open to any good approach.

@holgerfriedrich
Copy link
Member

@kaikreuzer I asked the AI to create what I described. With some more infos, the output seems reasonable:

holgerfriedrich@43400f1

It introduces the parameter, uses it as a condition for all publish and git push sections.

Additionally, it should upload the artifacts to GH. This may need a different pattern for the respective file names.

Overall, this is the built-in and easy solution.
Benefit is that we can test the artifact.
Downside is that we need to retrigger later, setting all the parameters (version, next version) again and correctly.
I order to get around this, we would need to use those additional actions built specifically to allow a user interaction during between steps of a build.

@holgerfriedrich
Copy link
Member

@kaikreuzer could you pls. rebase? If I run the action, it fails during build because of changed xsd. This was fixed on main in the meantime.

kaikreuzer and others added 5 commits December 6, 2025 09:05
Signed-off-by: Kai Kreuzer <kai@openhab.org>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Kai Kreuzer <kai@openhab.org>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Kai Kreuzer <kai@openhab.org>
…-release@v2 (#526)

* Initial plan

* Replace deprecated actions/create-release@v1 with softprops/action-gh-release@v2

Co-authored-by: kaikreuzer <3244965+kaikreuzer@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kaikreuzer <3244965+kaikreuzer@users.noreply.github.com>
* Initial plan

* Fix duplicated POM file lists: use find command and glob patterns

Co-authored-by: kaikreuzer <3244965+kaikreuzer@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kaikreuzer <3244965+kaikreuzer@users.noreply.github.com>
kaikreuzer and others added 6 commits December 6, 2025 09:05
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Kai Kreuzer <kai@openhab.org>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Kai Kreuzer <kai@openhab.org>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Kai Kreuzer <kai@openhab.org>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Kai Kreuzer <kai@openhab.org>
Co-authored-by: Holger Friedrich <mail@holger-friedrich.de>
Signed-off-by: Kai Kreuzer <kai@openhab.org>
…se workflow (#528)

* Initial plan

* Add explicit fail-fast behavior for Maven Central deployment

Co-authored-by: kaikreuzer <3244965+kaikreuzer@users.noreply.github.com>

* Remove unused output from maven-deploy step

Co-authored-by: kaikreuzer <3244965+kaikreuzer@users.noreply.github.com>

---------

Signed-off-by: Kai Kreuzer <kai@openhab.org>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kaikreuzer <3244965+kaikreuzer@users.noreply.github.com>
Co-authored-by: Kai Kreuzer <kai@openhab.org>
@kaikreuzer
Copy link
Member Author

@holgerfriedrich I just rebased it.

@holgerfriedrich
Copy link
Member

@kaikreuzer almost got the first part running, see https://github.com/holgerfriedrich/static-code-analysis/commits/pr-dryrun
Upload still does not pick artefacts.

@holgerfriedrich
Copy link
Member

How shall we proceed? If I look at https://github.com/holgerfriedrich/static-code-analysis/actions/runs/19986744870, I see that collecting artefacts worked, but the content of the zip seems not of much use to me.
Do you want to proceed with this idea or should we just get it working without the dryrun feature?

kaikreuzer and others added 3 commits December 9, 2025 22:19
Co-authored-by: Holger Friedrich <mail@holger-friedrich.de>
Signed-off-by: Kai Kreuzer <kai@openhab.org>
Co-authored-by: Holger Friedrich <mail@holger-friedrich.de>
Signed-off-by: Kai Kreuzer <kai@openhab.org>
Co-authored-by: Holger Friedrich <mail@holger-friedrich.de>
Signed-off-by: Kai Kreuzer <kai@openhab.org>
@kaikreuzer
Copy link
Member Author

but the content of the zip seems not of much use to me

Not much use or not much sense? If I look at the content, it at least seems that it correctly built the jars, right?

@holgerfriedrich
Copy link
Member

Yes, it did. But not sure if this is useful.

You could give it a try without this changes.
I think we merged everything we want for 0.18.

@kaikreuzer kaikreuzer merged commit 38893ee into main Dec 13, 2025
2 checks passed
@kaikreuzer kaikreuzer deleted the release branch December 13, 2025 15:58
@kaikreuzer
Copy link
Member Author

@holgerfriedrich
Copy link
Member

Did you check the GPG key stored in secrets?
It should be armored, i.e. start with -----BEGIN PGP PRIVATE KEY BLOCK-----

@kaikreuzer
Copy link
Member Author

Thanks @holgerfriedrich, it seems I indeed had a wrong format of the key.
Now publishing works, the pipeline now only fails because it tries to do a commit to main: https://github.com/openhab/static-code-analysis/actions/runs/20249411534/job/58137742534

I'd like to grant the github action an exception on the branch protection rule, but I couldn't yet figure out, how to do that...

@holgerfriedrich
Copy link
Member

@kaikreuzer I don't know how the branch protection is set up for this repo. If you could switch from classic to ruleset based protection, there is a bypass option already given:

grafik

@holgerfriedrich
Copy link
Member

@kaikreuzer Surely there was no time during the last days. I would appreciate if you could proceed with that in the next weeks.

@kaikreuzer
Copy link
Member Author

Sure @holgerfriedrich, I'll continue on this. I actually did already last week and temporarily removed the branch protection, but then stumbled over the next issue that I wasn't sure how to resolve, see https://github.com/openhab/static-code-analysis/actions/runs/20298054017/job/58296420614.

@holgerfriedrich
Copy link
Member

@kaikreuzer Maybe it is the pom from the test folder again.... remember we had to add an exception in another place of the script:

 for pom in $(find . -name pom.xml -not -path "*/target/*" -not -path "*/src/test/resources/*"); do

To get a better picture what could be wrong, maybe echo the name of the pom in this loop:

   # Update parent version in all child POMs
  # Find all pom.xml files except the root pom.xml
  for pom in $(find . -name pom.xml ! -path "./pom.xml"); do
    if [ -f "$pom" ]; then
      mvn versions:update-parent -DparentVersion=0.19.0-SNAPSHOT -f "$pom"
      mvn versions:commit -f "$pom"
    fi
  done

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