Skip to content

ci: create GitHub release after publishing to Maven Central - #69

Merged
alexgerardojacinto merged 1 commit into
mainfrom
chore/RMET-5634/create-github-release-on-publish
Nov 25, 2026
Merged

alexgerardojacinto merged 1 commit into
mainfrom
chore/RMET-5634/create-github-release-on-publish

Conversation

@alexgerardojacinto

Copy link
Copy Markdown
Collaborator

Summary

The "Publish Native Android Library" workflow now creates the GitHub tag and release itself, right after the library is published to Maven Central, so the release no longer has to be created by hand.

  • scripts/publish-android.sh: after Success: Published to MavenCentral., writes published=true and version to $GITHUB_OUTPUT. The existing "Duplicate ... skipping" path is unchanged, so a re-run for an already-published version does nothing.
  • .github/workflows/publish-android.yml: contents: read -> contents: write, and a new Create GitHub release step that:
    • only runs when this run actually published a new version, and only from main or next;
    • creates the tag and release named <version> (same naming as the existing tags, no v prefix) on the commit that was built ($GITHUB_SHA);
    • uses the matching CHANGELOG.md section as release notes, falling back to GitHub's generated notes when there is none;
    • marks versions containing - (e.g. 3.0.0-alpha.1) as pre-releases;
    • skips if a release for that version already exists.

Notes

  • The release is created after the script reports success, which is when Central accepts the upload. A validation failure on the Central Portal after that would still leave a release behind, so it is still worth checking the artifact shows up on Maven Central.
  • Same change applied to the other native Android library repos.

Test plan

  • Workflow YAML and publish-android.sh syntax validated locally
  • CHANGELOG section extraction checked against existing and upcoming versions
  • Verify on the next real publish (nothing to test earlier, since the workflow only runs on manual dispatch)

@alexgerardojacinto
alexgerardojacinto requested review from a team, andredestro and theproducer and removed request for a team November 24, 2026 13:25
@alexgerardojacinto
alexgerardojacinto merged commit 0214871 into main Nov 25, 2026
7 checks passed
@alexgerardojacinto
alexgerardojacinto deleted the chore/RMET-5634/create-github-release-on-publish branch November 25, 2026 12:51
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.

3 participants