-
Notifications
You must be signed in to change notification settings - Fork 36
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
base: master
Are you sure you want to change the base?
Conversation
- 'releases/**' | ||
- '!releases/**-alpha' |
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.
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' |
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.
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") |
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.
This will still be used to version, sbt-ci-release includes and uses it.
Hi @wing328, sorry to tag you directly. Is this PR something that would improve on the SBT plugin? |
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.
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 |
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.
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.
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. Thank you 🙏 |
Any update here? |
published to https://repo1.maven.org/maven2/org/openapitools/sbt-openapi-generator_2.12_1.0/7.3.0/ (via running please give it a try when you've time |
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