Skip to content

Added github action to publish#45

Merged
ethan-wrasman-pkware merged 1 commit into
mainfrom
ew/update_github_actions
Aug 14, 2025
Merged

Added github action to publish#45
ethan-wrasman-pkware merged 1 commit into
mainfrom
ew/update_github_actions

Conversation

@ethan-wrasman-pkware
Copy link
Copy Markdown
Contributor

No description provided.

@ethan-wrasman-pkware ethan-wrasman-pkware force-pushed the ew/update_github_actions branch 2 times, most recently from 696aacb to f090e1b Compare August 13, 2025 19:38
Comment thread README.md
`git tag -a X.Y.Z -m "X.Y.Z"`(X.Y.Z is the new version).
7. Run `git push --tags`.
8. Run `./gradlew publish` in the terminal or command line.
9. Visit [Sonatype Nexus] and promote the artifact.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

My understanding is we still need to promote the artifact. I think they call it components now.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I see. I think the issue with this will be that you or someone else registered under the namespace will still need to manually promote it. I'll look to see if there is an api call I can use that does this.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yeah. if we cannot automate and/or make an api call to promote the artifact using the action, I am not sure how much value we will get from using secrets for the rest of the publishing steps. If it cannot be automated, you would still need non secret creds to login to nexus to promote the artifact like you are saying

Comment thread file-attribute-caching/build.gradle.kts Outdated
// Signing credentials are stored locally in the user's global gradle.properties file.
// See https://docs.gradle.org/current/userguide/signing_plugin.html#sec:signatory_credentials for more information.
useInMemoryPgpKeys(
signingKeyId,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Oh I see, for pgp subkeys. all good.

Copy link
Copy Markdown
Collaborator

@mbayerPK mbayerPK left a comment

Choose a reason for hiding this comment

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

Approving but left some comments that I would like addressed before things are merged

signing {
// Signing credentials are stored locally in the user's global gradle.properties file.
// See https://docs.gradle.org/current/userguide/signing_plugin.html#sec:signatory_credentials for more information.
useInMemoryPgpKeys(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I would still prefer some docs here about what signingKeyId, signingKey, and signingPassword refer to, namely the SIGNING_KEY_ID and ORG_GRADLE_PROJECT_SIGNING_KEY_ID and other env vars in the github build environment .github/workflows/publish.yml build action file and lines 118-124 below.

You could still include the link to https://docs.gradle.org/current/userguide/signing_plugin.html#sec:signatory_credentials as I recall this being a harder thing to figure out and this would be helpful if anything needs to change in the future

distribution: 'temurin'

- name: Publish to Maven Central
run: ./gradlew publish
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I dont think we want to publish snapshot builds to maven central at all either so you should add a if: "!contains(github.ref, 'SNAPSHOT')" check here as well.

Or maybe have an overall rule for the entire file that nothing is done for a snapshot build here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Whatever rule I set up, I'll add to the readme. We do want the ability to publish a snapshot (the ./gradlew publish already had functionality for it and Marius set it up in sonatype). I'm going to change the whole pipeline to run only from a release branch.

If we want a normal release, merge to main from release/x.x.x
If we want a snapshot release, merge to main from release/x.x.x-SNAPSHOT

@ethan-wrasman-pkware ethan-wrasman-pkware merged commit 697f7a8 into main Aug 14, 2025
2 checks passed
@ethan-wrasman-pkware ethan-wrasman-pkware deleted the ew/update_github_actions branch August 14, 2025 13:21
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.

3 participants