ci(make): ensure minimal PR before merge#11
Conversation
- Introduced `stagingPath` task to output the staging repository path for Maven artifacts. - Updated GitHub Actions `publish.yml` to utilize the `stagingPath` task for generating release notes during tag creation.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Pull request overview
Adds CI support for creating GitHub Releases from locally staged Maven artifacts by introducing a Gradle helper task and a new publish workflow step, while adjusting signing behavior during publishing.
Changes:
- Comment out
signAllPublications()in Gradle publishing configuration. - Add
stagingPathGradle task to print the expected staging repository path for the primary publication. - Add a GitHub Actions step to create a GitHub Release via
ghwhen a tag is detected, uploading staged artifacts and generating notes.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| build.gradle.kts | Disables automatic signing and adds a stagingPath task for CI to locate staged artifacts. |
| .github/workflows/publish.yml | Adds a tag-gated gh release create step intended to publish a GitHub Release from staged artifacts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - run: | | ||
| export STAGING=$(printf "%s" $(./gradlew stagingPath --quiet)) | ||
| gh release create ${{ github.event.workflow_run.head_sha }} --generate-notes $STAGING/* --verify-tag | ||
| if: ${{ steps.detect-tag.outputs.is_tag == 'true' }} |
There was a problem hiding this comment.
gh release create expects the tag name as its first argument. This step passes github.event.workflow_run.head_sha, which is a commit SHA (and will fail --verify-tag even when a tag exists). Use the actual tag detected in the previous step (and expose it as an output) as the release/tag name.
| export STAGING=$(printf "%s" $(./gradlew stagingPath --quiet)) | ||
| gh release create ${{ github.event.workflow_run.head_sha }} --generate-notes $STAGING/* --verify-tag |
There was a problem hiding this comment.
The STAGING path capture and globbing here are brittle: unquoted command substitution/variable expansion can break on whitespace, and $STAGING/* will be passed literally if the directory is missing/empty. Prefer capturing with quotes and verifying the directory contains files before calling gh release create (or enabling nullglob) so the workflow fails with a clear error.
| export STAGING=$(printf "%s" $(./gradlew stagingPath --quiet)) | |
| gh release create ${{ github.event.workflow_run.head_sha }} --generate-notes $STAGING/* --verify-tag | |
| STAGING="$(./gradlew stagingPath --quiet)" | |
| if [ ! -d "$STAGING" ]; then | |
| echo "Staging directory '$STAGING' does not exist or is not a directory" >&2 | |
| exit 1 | |
| fi | |
| shopt -s nullglob | |
| files=("$STAGING"/*) | |
| if [ ${#files[@]} -eq 0 ]; then | |
| echo "No files found in staging directory '$STAGING'" >&2 | |
| exit 1 | |
| fi | |
| gh release create ${{ github.event.workflow_run.head_sha }} --generate-notes "${files[@]}" --verify-tag |
updating
message to post-CI