Skip to content

feat(ci): add ship-based release automation and migrate publishing to maven central#113

Merged
utkrishtsahu merged 3 commits into
masterfrom
feat/ship-release-pipeline
Jul 24, 2026
Merged

feat(ci): add ship-based release automation and migrate publishing to maven central#113
utkrishtsahu merged 3 commits into
masterfrom
feat/ship-release-pipeline

Conversation

@utkrishtsahu

@utkrishtsahu utkrishtsahu commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Changes

Adds release automation to JWTDecode.Android (currently none) and migrates publishing from the retired OSSRH endpoint (oss.sonatype.org, now HTTP 402) to the Sonatype Central Portal. Mirrors the auth0/ship pipeline used by Auth0.Android, adapted for this pure-Java library. Last release was 2.0.2 (Jan 2023) with ~33 unreleased commits — releasing is currently impossible.

Added

  • Workflows: release.yml (triggers on release/* PR merge), java-release.yml (reusable), snapshot.yml (safe rehearsal → snapshots repo).
  • Composite actions: get-version, get-prerelease, get-release-notes, tag-exists, release-create, maven-publish.
  • .version, .shiprc (ship control files); gradle/versioning.gradle, gradle/maven-publish.gradle; POM metadata in gradle.properties.
  • Root build.gradle: nexus-publish 2.0.0 + Central Portal config; removed dead jcenter().

Removed

  • publish.yml (targeted the dead endpoint) and the oss-library plugin from lib/build.gradle.

Public API: No source changes — no endpoints, classes, or methods affected. Release tooling only; artifact coordinates (com.auth0.android:jwtdecode) unchanged.

Usage: npx @a0/ship <patch|minor|major> → opens a release/X.Y.Z PR → merge publishes a staged Central Portal release + GitHub release.

Alternatives considered: Keeping oss-library (rejected — dead endpoint, git describe versioning incompatible with ship); upgrading the toolchain (unnecessary — nexus-publish 2.0.0 supports Gradle 6.2, so left unchanged).

References

SDK-10343

Testing

Testing

  • Build + tests: existing test.yml runs ./gradlew clean test jacocoTestReport on every PR, exercising the rewritten lib/build.gradle.
  • Publish plumbing: run snapshot.yml manually — full credential/signing/upload chain to the disposable snapshots repo (2.0.2-SNAPSHOT), never a permanent release.
  • Release is staged/reversible — nothing goes public until manually promoted in the Central Portal.
  • Not tested locally: a corporate TLS proxy resets the JVM's connections ("Socket closed") while curl succeeds — an environment issue, not config. CI (Ubuntu, no proxy) is the verification path; all YAML/gradle config was parse-validated offline.

[x] This change adds test coverage

[x] This change has been tested on the latest version of the platform/language or why not

Checklist

[x] I have read the Auth0 general contribution guidelines

[x] I have read the Auth0 Code of Conduct

[x] All existing and new tests complete without errors

@utkrishtsahu
utkrishtsahu requested a review from a team as a code owner July 24, 2026 10:27
# Returns a simple true/false boolean indicating whether the version indicates it's a prerelease or not.
#
# TODO: Remove once the common repo is public.
#

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Remove this #TODO

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.

fixed

# Returns the release notes from the content of a pull request linked to a release branch. It expects the branch name to be in the format release/vX.Y.Z, release/X.Y.Z, release/vX.Y.Z-beta.N. etc.
#
# TODO: Remove once the common repo is public.
#

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Remove #TODO

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.

fixed

Comment thread .github/actions/get-version/action.yml Outdated
#
# Returns the version from the .version file.
#
# TODO: Remove once the common repo is public.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Remove #TODO

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.

fixed

#
# Creates a GitHub release with the given version.
#
# TODO: Remove once the common repo is public.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

remove #TODO

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.

fixed

Comment thread .github/actions/tag-exists/action.yml Outdated
#
# Returns a simple true/false boolean indicating whether the tag exists or not.
#
# TODO: Remove once the common repo is public.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Remove #TODO

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.

fixed

Comment thread .github/workflows/java-release.yml Outdated

### TODO: Replace instances of './.github/actions/' w/ `auth0/dx-sdk-actions/` and append `@latest` after the common `dx-sdk-actions` repo is made public.
### TODO: Also remove `get-prerelease`, `get-version`, `release-create`, `tag-create` and `tag-exists` actions from this repo's .github/actions folder once the repo is public.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Remove #TODOs

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.

fixed

Comment thread .github/workflows/java-release.yml Outdated
ossr-username: ${{ secrets.ossr-username }}
ossr-token: ${{ secrets.ossr-token }}
signing-key: ${{ secrets.signing-key}}
signing-password: ${{ secrets.signing-password}}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This approach of accessing secrets might fail now. If it fails we should do something like this

ossr-username: ${{ secrets.OSSR_USERNAME }}
          ossr-token: ${{ secrets.OSSR_TOKEN }}
          signing-key: ${{ secrets.SIGNING_KEY }}
          signing-password: ${{ secrets.SIGNING_PASSWORD }}

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.

repleced

Comment thread .github/workflows/release.yml Outdated
### TODO: Replace instances of './.github/workflows/' w/ `auth0/dx-sdk-actions/workflows/` and append `@latest` after the common `dx-sdk-actions` repo is made public.
### TODO: Also remove `get-prerelease`, `get-release-notes`, `get-version`, `maven-publish`, `release-create`, and `tag-exists` actions from this repo's .github/actions folder once the repo is public.
### TODO: Also remove `java-release` workflow from this repo's .github/workflows folder once the repo is public.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Remove the TODOs

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.

fixed

Comment thread .github/workflows/snapshot.yml Outdated
@@ -0,0 +1,40 @@
name: Publish Snapshot (rehearsal)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do you need the snapshot ?

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.

used for dry test.Removed.

Comment thread build.gradle Outdated
repositories {
sonatype {
nexusUrl.set(uri('https://ossrh-staging-api.central.sonatype.com/service/local/'))
snapshotRepositoryUrl.set(uri('https://central.sonatype.com/repository/maven-snapshots/'))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we need snapshot ?

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.

used for dry test.Removed.

@pmathew92 pmathew92 changed the title feat(ci): add ship-based release automation and migrate publishing to… feat(ci): add ship-based release automation and migrate publishing to maven central Jul 24, 2026
@utkrishtsahu
utkrishtsahu merged commit a6d7811 into master Jul 24, 2026
4 checks passed
@utkrishtsahu
utkrishtsahu deleted the feat/ship-release-pipeline branch July 24, 2026 10:57
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.

2 participants