Skip to content
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

Publish to Maven Central manually #644

Merged
merged 5 commits into from Sep 27, 2022
Merged

Publish to Maven Central manually #644

merged 5 commits into from Sep 27, 2022

Conversation

elliotmjackson
Copy link
Contributor

@elliotmjackson elliotmjackson commented Sep 26, 2022

In #640 we decided to publish to Apache Maven Central via mvn publish:prepare whilst this provides simplicity, it removes some flexibility which we now understand is quite nice to have.

This PR attempts to perform the action of mvn on git tag creation manually by:

  1. building the project jars using mvn install
  2. signing all jars and poms
  3. publishing all including their signed counterparts.

Whilst the majority of these changes are for actions which run on tag creation, you can view a successful trial run here

To prepare for our next release I have also bumped the version in all poms to 0.6.9

NOTE: this does not yet perform the release to public, some confidence gathering required to get us there.

Signed-off-by: Elliot Jackson 13633636+ElliotMJackson@users.noreply.github.com

@elliotmjackson elliotmjackson force-pushed the ejackson/remove-mvn branch 2 times, most recently from 613304e to b3d7dfc Compare September 27, 2022 15:42
Signed-off-by: Elliot Jackson <13633636+ElliotMJackson@users.noreply.github.com>
Signed-off-by: Elliot Jackson <13633636+ElliotMJackson@users.noreply.github.com>
Signed-off-by: Elliot Jackson <13633636+ElliotMJackson@users.noreply.github.com>
@elliotmjackson elliotmjackson changed the title Remove Maven Publish to Maven Central manually Sep 27, 2022
Signed-off-by: Elliot Jackson <13633636+ElliotMJackson@users.noreply.github.com>
Signed-off-by: Elliot Jackson <13633636+ElliotMJackson@users.noreply.github.com>
READWRITE_API_KEY: ${{ secrets.SONATYPE_PASSWORD }}
ENVOY_PROXY_PROFILE_ID: ${{ secrets.ENVOY_PROXY_PROFILE_ID }}
run: |
python sonatype_nexus_upload.py \
Copy link

Choose a reason for hiding this comment

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

This publishes then in the right artifact directory?

Like does pgv-java-grpc-0.6.9-SNAPSHOT go to the directory ~/.m2/repository/io/envoyproxy/protoc-gen-validate/pgv-java-grpc/0.6.8-SNAPSHOT/pgv-java-grpc-0.6.8-SNAPSHOT.jar when you use the --local flag for the script?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

these were retrieved by running this on the runner.

find . -type f \( -iname "pom.xml" -o -iname "*.jar" \) -exec printf "%s\n" {}" \ " \;

you can see the successful run here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I originally wanted to fetch these dynamically but the github actions syntax wasnt playing nice so I've abandoned that idea for now

@@ -3,7 +3,7 @@
<parent>
<artifactId>pgv-java</artifactId>
<groupId>io.envoyproxy.protoc-gen-validate</groupId>
<version>0.6.8-SNAPSHOT</version>
<version>0.6.9-rc.0-SNAPSHOT</version>

Choose a reason for hiding this comment

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

Seems like a pain to manually do. What if we overwrite this via the python script since it's just a quick file io in CI?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

absolutely, i want to do this as part of a semver step I'll work on next.

@elliotmjackson elliotmjackson marked this pull request as ready for review September 27, 2022 17:58
Copy link

@buildbreaker buildbreaker left a comment

Choose a reason for hiding this comment

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

Sounds good!

Copy link

@joshcarp joshcarp left a comment

Choose a reason for hiding this comment

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

Not exactly sure what the python stuff does but LGTM

@elliotmjackson elliotmjackson merged commit 4d6f564 into main Sep 27, 2022
@elliotmjackson elliotmjackson deleted the ejackson/remove-mvn branch September 27, 2022 19:02
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.

None yet

3 participants