-
Notifications
You must be signed in to change notification settings - Fork 30
Close and publish maven artifacts #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
git checkout presto-maven-plugin-${{ env.RELEASE_VERSION }} | ||
git ls -5 | ||
cat ~/.m2/settings.xml | ||
mvn clean install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
run tests
Reviewer's guide (collapsed on small PRs)Reviewer's GuideSplit the release workflow into distinct upload and publish phases and add a curl-based call to the Sonatype OSSRH staging API to finalize artifact publication. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
- name: Publish artifacts | ||
run: | | ||
AUTH_TOKEN=$(echo -n "${NEXUS_USERNAME}:${NEXUS_PASSWORD}" | base64) | ||
echo "::add-mask::${AUTH_TOKEN}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mask the token in logs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there - I've reviewed your changes and they look great!
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `.github/workflows/release.yml:97-100` </location>
<code_context>
+ - name: Publish artifacts
+ run: |
+ AUTH_TOKEN=$(echo -n "${NEXUS_USERNAME}:${NEXUS_PASSWORD}" | base64)
+ echo "::add-mask::${AUTH_TOKEN}"
+ curl -v -X POST "https://ossrh-staging-api.central.sonatype.com/manual/upload/defaultRepository/com.facebook?publishing_type=automatic" \
+ -H "Authorization: Bearer ${AUTH_TOKEN}"
+
- name: Push changes and tags
</code_context>
<issue_to_address>
**issue (bug_risk):** Review use of Bearer token for Sonatype API authentication.
Sonatype expects Basic authentication (base64-encoded username:password) rather than Bearer tokens. Please verify the required header format in the API documentation to avoid authentication issues.
</issue_to_address>
### Comment 2
<location> `.github/workflows/release.yml:96-100` </location>
<code_context>
+ run: |
+ AUTH_TOKEN=$(echo -n "${NEXUS_USERNAME}:${NEXUS_PASSWORD}" | base64)
+ echo "::add-mask::${AUTH_TOKEN}"
+ curl -v -X POST "https://ossrh-staging-api.central.sonatype.com/manual/upload/defaultRepository/com.facebook?publishing_type=automatic" \
+ -H "Authorization: Bearer ${AUTH_TOKEN}"
+
</code_context>
<issue_to_address>
**suggestion (bug_risk):** Consider error handling for the curl upload step.
Without error handling, a failed curl upload won't stop the workflow. Add 'set -e' or check the curl exit code to ensure the job fails on upload errors.
```suggestion
run: |
set -e
AUTH_TOKEN=$(echo -n "${NEXUS_USERNAME}:${NEXUS_PASSWORD}" | base64)
echo "::add-mask::${AUTH_TOKEN}"
curl -v -X POST "https://ossrh-staging-api.central.sonatype.com/manual/upload/defaultRepository/com.facebook?publishing_type=automatic" \
-H "Authorization: Bearer ${AUTH_TOKEN}"
```
</issue_to_address>
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
db67a8d
to
2a011b8
Compare
We can leave this PR until next release. |
The current release action only upload the artifacts, need to call the API to publish uploaded artifacts.