asciidoctor / asciidoctor-leanpub-converter

A backend for AsciidoctorJ to generate Leanpub-flavoured Markdown
Apache License 2.0
16 stars 9 forks source link

Publish to Maven Central #89

Closed robertpanzer closed 3 years ago

robertpanzer commented 3 years ago

This PR updates the build to publish to Maven central instead of jcenter. I more or less followed the description from https://github.com/rwinch/gradle-publish-ossrh-sample

To build a release follow these steps:

  1. Build the release with
    # ./gradlew clean build
  2. After testing publish all artifacts to a local repository under converters/build/repos with
    ./gradlew publishAllPublicationsToLocalRepository -i
  3. When everything is fine publish the artifacts to a staging repository on https://oss.sonatype.org and close the repository:
    # ./gradlew publishAllPublicationsToSonatypeRepository -i
    # ./gradlew closeRepository -i
  4. Visit https://oss.sonatype.org/#stagingRepositories and check the staging repository. The artifacts are not published yet. The repository URL shown there can be used for testing this version before publishing to Maven central.
  5. When everything is fine publish the artifacts in the staging repository by clicking the "Release" button. Alternatively you can release it with
    # ./gradlew releaseRepository

I uploaded the artifacts with this PR to https://oss.sonatype.org/content/repositories/orgasciidoctor-1242.

There might be some more cleanup possible. I am not too familiar with the travisci plugin, so it might be necessary to clean that up as well.

ysb33r commented 3 years ago

Thanks!

I guess we have to do the CI-publishing in a separate PR?

robertpanzer commented 3 years ago

Yes, if you are doing that. I didn't go that route yet for AsciidoctorJ as I am still not really sure that not anybody could get access to my secrets just via a simple PR.

ysb33r commented 3 years ago

I think you set up a secret in the organisation. I'm not sure with GitHub, but I lknow on Gitlab you can get it to only get applied on protected repositories such as master or custom release branches.