Agent Skill · Apollo Config
apollo-java-release
Automate Apollo Java formal release operations end-to-end with a single command and explicit human checkpoints. Use when preparing a non-SNAPSHOT Apollo Java release, creating release PR/tag/workflow/discussion, relying on Sonatype Central auto-publish via Maven plugin, and opening the post-release SNAPSHOT PR.
Skill body
Apollo Java Release
Run this skill when you want to execute the Apollo Java formal release workflow in a controlled and resumable way.
Workflow Contract
- Work only in the current directory.
- Require current directory to be Apollo Java repository root (
apollo-java+ rootpom.xmlartifactIdapollo-java). - Require at least one git remote URL to normalize to
github.com/apolloconfig/apollo-java. - Require an explicit checkpoint confirmation before each external publish action.
- Persist progress in a state file and support resume without repeating completed steps.
Command Entry
python3 scripts/release_flow.py run \
--release-version X.Y.Z \
--next-snapshot A.B.C-SNAPSHOT \
--highlight-prs PR_ID_1,PR_ID_2 \
[--state-file .apollo-java-release-state.json] \
[--confirm-checkpoint CHECKPOINT]
Supported checkpoints
PUSH_RELEASE_PRCREATE_PRERELEASETRIGGER_RELEASE_WORKFLOWCREATE_ANNOUNCEMENT_DISCUSSIONPUSH_POST_RELEASE_PR
If execution stops at a checkpoint, rerun with --confirm-checkpoint <NAME>.
Step Mapping (1~7)
- Bump root
pom.xmlrevision fromX.Y.Z-SNAPSHOTtoX.Y.Z, create release branch/commit/PR draft. - Wait for release PR merge, then create GitHub prerelease (
vX.Y.Z, targetmain). - Trigger
.github/workflows/release.yml; the workflow publishes throughcentral-publishing-maven-pluginwithautoPublish=trueand waits untilpublished. - Publish announcement discussion in
Announcementswith title/body aligned to existing Apollo Java style. - Post-release housekeeping: bump to next SNAPSHOT, archive
CHANGES.md, close/create milestones, and open post-release PR. - Promote prerelease tag to official release, mark it as
latest, after workflow publish succeeds. - Print final report with PR/release/workflow/discussion links for traceability.
Scripts
scripts/release_flow.py- Main orchestrator.
- Handles preflight, checkpoint gating, workflow execution, resume state, and final summary.
scripts/release_notes_builder.py- Uses
CHANGES.mdas primary source. - Merges GitHub generated notes for
New Contributorsand changelog link. - Builds
Highlightsonly from user-selected PRs (--highlight-prs) and extracts usage hints from selected PR body/comments/docs changes.
- Uses
.github/workflows/release.yml(apollo-java repo)- Publishes artifacts via Sonatype Central Maven plugin with auto-publish enabled.
scripts/github_discussion.py- Creates discussions via GraphQL using category name/slug.
scripts/test_release_helpers.py- Unit tests for parser and helper behavior.
References
references/templates.md: Release note and announcement templates.
Operational Notes
- Prefer
--dry-runfirst to validate plan and checkpoints without side effects. - Keep release operations on clean working tree unless explicitly bypassing with
--allow-dirty. - Do not push, create PRs, create releases, trigger workflows, or publish discussions without checkpoint confirmation.
--highlight-prsis required and determines which PRs are used forHighlights; do not auto-pick highlights.- Always show generated release PR/release notes/announcement/post-release PR drafts and confirm wording before corresponding publish checkpoints.
- Release notes
What's Changedentries should include PR authors usingby @<author> in <PR URL>format so contributors are notified.