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

fix: start releasing to Sonatype #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ckipp01
Copy link

@ckipp01 ckipp01 commented Aug 31, 2022

Since bintray is no longer an option, this sets up sbt-ci-release which
is commonly used for sbt plugins to do releases. I'll include some
comments inline.

What is yet needed

In order for this to work you'll need to ensure the following secrets are set up for this repo:

  • PGP_PASSPHRASE
  • PGP_SECRET
  • SONATYPE_PASSWORD
  • SONATYPE_USERNAME

You can find descriptions of what these are and how to get them all here. This will allow this plugin to be published just like anything else under https://repo1.maven.org/maven2/org/openapitools/. This setup also will start publishing snapshots on merge into master. To trigger a new release, all you'd need to do is push a new tag.

Let me know if there is anything you'd like further explanation on.

Closes #35

Comment on lines -8 to -9
- 'releases/**'
- '!releases/**-alpha'
Copy link
Author

Choose a reason for hiding this comment

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

These didn't seem to be used, plus you'll get SNAPSHOTS being published now. This just simplifies things.

with:
path: ~/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('**/*.sbt') }}
cache: 'sbt'
Copy link
Author

Choose a reason for hiding this comment

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

Instead of all the manual caching, setup/java@3 has built-in sbt caching.

addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.6")

// Versions the build.
addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.1.1")
Copy link
Author

Choose a reason for hiding this comment

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

This will still be used to version, sbt-ci-release includes and uses it.

@nMoncho
Copy link

nMoncho commented Oct 14, 2022

Hi @wing328, sorry to tag you directly. Is this PR something that would improve on the SBT plugin?
This way it would be deployed into maven central, like the other openapi artifacts

@wing328
Copy link
Member

wing328 commented Oct 17, 2022

@ckipp01 first of all, thanks for the PR.

@nMoncho no need to sorry. Generally we welcome enhancements but I didn't have time to review this as there're so many PRs to the openapi-generator repo.

Have you reviewed and tested it somehow?

Since bintray is no longer an option, this sets up sbt-ci-release which
is commonly used for sbt plugins to do releases. I'll include some
comments inline.
@ckipp01
Copy link
Author

ckipp01 commented Oct 20, 2022

Have you reviewed and tested it somehow?

Well there isn't a great way to test this since it's the CI release procedure. However, again, this is the same approach used in most modern sbt plugins. Just to give an example here is another I maintain, sbt-scoverage with a minimal, but similiar setup.

The best way to test this is essentially to merge this branch. If the secrets for publishing that I mentioned are set up correctly we'll end up with a new snapshot on sonatype snapshots. If that doesn't work, I'm happy to trouble-shoot and pr another fix.

Apart from that, you can locally still see that sbt version gives you what you'd expect, ^scripted still works, and publishLocal still publishes as you'd expect. Let me know how you'd like to proceed.

Copy link
Contributor

@jrouly jrouly left a comment

Choose a reason for hiding this comment

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

This looks good to me as well. I don't have access to repo settings so I can't tell if the environment is configured.

I think either @wing328 or @jimschubert will need to take a look.

@wing328
Copy link
Member

wing328 commented Oct 20, 2022

thanks for reviewing the change.

i'll give it a try next week

@hochgi
Copy link

hochgi commented Jan 26, 2023

thanks for reviewing the change.

i'll give it a try next week

@wing328 I've been following up on this for a while now.
Can I ask where this stands?

Thank you 🙏

@jshuttAH
Copy link

jshuttAH commented May 3, 2023

Any update here?

@fernandoacorreia
Copy link

@jrouly , @ckipp01, @wing328, friendly ping. Thanks for working on this PR. What's left to get it across the line? It would be great to be able to use this plugin on a project I'm working on.

@wing328
Copy link
Member

wing328 commented Mar 26, 2024

published to https://repo1.maven.org/maven2/org/openapitools/sbt-openapi-generator_2.12_1.0/7.3.0/ (via running sbt publish locally)

please give it a try when you've time

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.

Migrate off of private bintray repository
8 participants