ci: externalize release workflow helper scripts
## What's the purpose of this PR
This PR makes the Apollo Java release automation workflows easier to maintain by extracting inline Python blocks from GitHub Actions YAML into dedicated script files under `.github/scripts`. It keeps the existing behavior for both `snapshots` and `releases`, while making the release context extraction and Sonatype publish logic reusable and testable.
## Which issue(s) this PR fixes:
Fixes # N/A (release task)
## Brief changelog
- Added `.github/scripts/release_extract_upload_context.py` to parse `maven-deploy.log` and emit upload URL context.
- Added `.github/scripts/release_resolve_repository_context.py` to resolve `repository_key` / `portal_deployment_id` for `releases` only.
- Added `.github/scripts/release_write_summary.py` to publish workflow summary from generated context JSON files.
- Added `.github/scripts/sonatype_publish.py` to encapsulate Sonatype upload/poll/publish flow.
- Updated `.github/workflows/release.yml` to call script files instead of inline Python.
- Added `.github/workflows/sonatype-publish.yml` and switched it to script-based execution.
- Preserved snapshots compatibility: when `repository=snapshots`, repository context is marked `not_applicable` and does not require staging repository resolution.
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/apolloconfig/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit tests to verify the code.
- [ ] Run `mvn clean test` to make sure this pull request doesn't break anything.
- [ ] Update the [`CHANGES` log](https://github.com/apolloconfig/apollo-java/blob/master/CHANGES.md).
Validation performed in this branch:
- `python3 -m py_compile .github/scripts/release_extract_upload_context.py .github/scripts/release_resolve_repository_context.py .github/scripts/release_write_summary.py .github/scripts/sonatype_publish.py`
- `python3 - <<'PY' ... yaml.safe_load(...) ... PY` for `.github/workflows/release.yml` and `.github/workflows/sonatype-publish.yml`
- Local smoke run of scripts with temporary files/environment for snapshots compatibility and output contract checks.
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **Chores**
* Introduced Sonatype Central publishing automation workflow with end-to-end deployment tracking and status monitoring capabilities
* Enhanced release workflow with improved artifact extraction logging, repository context resolution, and comprehensive publish context summaries for GitHub Actions
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
合并状态:未合并 2 条评论