ci: upload openapi-generator-cli.jar as GitHub Release asset#23524
Conversation
There was a problem hiding this comment.
1 issue found across 1 file
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name=".github/workflows/maven-release.yml">
<violation number="1" location=".github/workflows/maven-release.yml:110">
P2: The workflow uploads an asset to a GitHub Release without ensuring the Release exists for the tag, so tag-triggered runs can fail when no Release has been created yet.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
|
looks like the workflow didn't run https://github.com/OpenAPITools/openapi-generator/actions/runs/25043326549 can we have the workflow run separately instead in a different workflow file? |
|
FYI. I've uploaded the JAR file as asset manually for the time being: https://github.com/OpenAPITools/openapi-generator/releases/download/v7.22.0/openapi-generator-cli-7.22.0.jar |
## Summary
Adds a new
upload-release-assetjob to the Maven release workflow thatuploads
openapi-generator-cli.jaras an asset to each GitHub Release tag.Motivation
Tools like aqua (a declarative CLI version
manager) rely on GitHub Release assets to install and manage CLI tools.
Since
openapi-generator-cli.jarwas only published to Maven Central and notattached to GitHub Releases, it was not possible to manage it via aqua or
similar GitHub-Releases-based version managers.
This change makes it possible to register
openapi-generator-cliin theaqua registry, following the same
pattern already established by tools like
ktfmt.Changes
tags: 'v*'trigger so the workflow also runs on version tag pushescontentspermission towritein thepublishjob to allowuploading release assets
upload-release-assetjob that:openapi-generator-cli-{version}.jarRelated Issue
Closes #23519
Summary by cubic
Attach
openapi-generator-cli.jarto each GitHub Release so the CLI can be installed via tools likeaqua. Adds a tag-triggered job that builds and uploads the JAR as a release asset.v*tags.upload-release-assetjob runs only on tag pushes.openapi-generator-cli-{version}.jarto the matching GitHub Release viagh, withcontents: writepermission.Written for commit adda3dc. Summary will update on new commits.