You are ready to release a new version of the Kotlin toolkit? Great, follow these steps:
- Figure out the next version using the semantic versioning scheme.
- Test a migration from the last released version.
- Update the migration guide in case of breaking changes.
- Issue the new release.
- Create a branch with the same name as the future tag, from
develop
. - Bump the version numbers in:
README
gradle.properties
test-app/build.gradle.kts
- Close the version in the
CHANGELOG.md
anddocs/migration-guide.md
, for example. - Create a PR to merge in
develop
and verify the CI workflows. - Squash and merge the PR.
- Tag the new version from
develop
.git checkout develop git pull git tag -a 3.0.1 -m 3.0.1 git push --tags
- Create a branch with the same name as the future tag, from
- Create a new release on GitHub.
- Add an APK to the release page with LCP enabled.
- Publish to Maven Central.
- Verify that the
Publish
workflow successfully pushed and closed the release to Maven Central. - Sign in to https://s01.oss.sonatype.org/
- Verify the content of the staging repository.
- Release the staging repository.
- Verify that the
- Check that the new modules can be imported in an Android project from Maven Central.
- Merge
develop
intomain
.
If the Publish
workflow fails, you may need to publish to Maven Central manually.
The Sonatype issue for Readium is located here.
- Make sure you have the secrets in
.envrc
and direnv installed. - Run:
./gradlew publishToMavenCentral --no-configuration-cache
- Sign in to https://s01.oss.sonatype.org/
- Publish manually the previously closed Staging repository
- Make sure you have the secrets in
local.properties
. - Run:
./gradlew clean assembleRelease ./gradlew androidSourcesJar javadocJar ./gradlew publishReleasePublicationToSonatypeRepository closeSonatypeStagingRepository
- Sign in to https://s01.oss.sonatype.org/
- Publish manually the previously closed Staging repository
Note that you can't run the gradlew commands separately, otherwise you get this error:
No staging repository with name sonatype created
If a CI workflow is stuck with this message:
Requested labels: ubuntu-18.04
Job defined at: readium/kotlin-toolkit/.github/workflows/docs.yml@refs/heads/main
Waiting for a runner to pick up this job...
Try to update the version of the OS image in the workflow.