-
Notifications
You must be signed in to change notification settings - Fork 0
Add automated version sync workflow, harden CI/CD, and restructure README #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The release workflow lacked safeguards against concurrent runs and bash script failures. Adding concurrency control prevents duplicate releases if a workflow is triggered multiple times. Strict bash mode (set -euo pipefail) ensures the version extraction script fails fast on any error rather than proceeding with potentially incorrect values. - Add concurrency group to prevent parallel release executions - Enable strict bash mode with set -euo pipefail - Explicitly set shell to bash for version extraction step - Normalize YAML quote style for consistency
After releases, the README version snippets can drift from the actual published version on Maven Central. This new workflow automatically fetches the latest release version from Maven Central metadata and updates the README's Gradle and Maven dependency snippets, keeping documentation accurate without manual intervention. - Create UpdateReadmeVersion.yaml workflow triggered on release and daily schedule - Fetch version from Maven Central maven-metadata.xml (release or latest tag) - Guard against SNAPSHOT versions being written to documentation - Update only the specific dependency coordinate lines via perl regex - Auto-commit changes when detected
The README lacked quick-glance status indicators and clear positioning within the Apple Maps ecosystem. Users unfamiliar with Apple's offerings couldn't easily understand what this SDK does vs MapKit vs MapKit JS. The new Origin header configuration was also undocumented for users with restricted JWTs. - Add Maven Central, CI status, and license badges - Clarify SDK purpose and distinguish from MapKit/MapKit JS - Add ecosystem comparison table for Apple Maps services - Document APPLE_MAPS_ORIGIN environment variable for JWT restrictions - Update example code to demonstrate Origin header usage - Expand "What's included" to "Supported Server API features" with clearer list - Improve quota section with Apple Developer Program context - Bump documented version from 0.1.3 to 0.1.4
- Standardize array bracket spacing in branch triggers - Use double quotes consistently for java-version and distribution - Remove unused contents: write permission
|
Caution Review failedThe pull request is closed. Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 📝 WalkthroughSummary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings. WalkthroughAdds/normalizes CI and Release workflow formatting and shell safety; introduces a new scheduled/manual workflow that fetches Maven Central and updates README dependency snippets; bumps project version and README snippets to 0.1.5 and expands README content and configuration guidance. Changes
Sequence Diagram(s)sequenceDiagram
participant Runner as Runner (GitHub Actions)
participant Maven as Maven Central (metadata)
participant Repo as Repository (git)
participant GitHub as GitHub API
Runner->>Maven: GET /maven2/.../com.williamcallahan/apple-maps-java/maven-metadata.xml
Maven-->>Runner: Respond with metadata (versions, latest non-SNAPSHOT)
Runner->>Runner: Extract VERSION from metadata
Runner->>Repo: Read `README.md`
Runner->>Runner: Replace Gradle/Maven snippet versions with VERSION
alt README changed
Runner->>Repo: Commit updated `README.md`
Repo->>GitHub: Push commit
GitHub-->>Runner: Confirm push
else No changes
Runner-->>Runner: Exit no-op
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a6980fe774
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR improves project documentation and marketing badges, introduces configuration docs for an optional APPLE_MAPS_ORIGIN, and enhances release/CI automation including an automated README version updater.
Changes:
- Add Context7 and DeepWiki badges (with local SVG assets) and expand the README with clearer installation, configuration (including
APPLE_MAPS_ORIGIN), compatibility, and quota documentation. - Bump README dependency examples to
0.1.4and link to new/expanded docs (authorization, tests, usage). - Add an
UpdateReadmeVersionworkflow to sync README with Maven Central metadata, and refine CI and Release workflows (concurrency, shell robustness, Java setup).
Reviewed changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
assets/deepwiki-badge.svg |
Adds a DeepWiki badge SVG used at the top of the README. |
assets/context7-badge.svg |
Adds a Context7 “Indexed” badge SVG used at the top of the README. |
README.md |
Updates badges, clarifies positioning of the SDK in the Apple Maps ecosystem, documents installation, APPLE_MAPS_TOKEN/APPLE_MAPS_ORIGIN configuration, usage features, compatibility, and quota details, and refreshes dependency versions. |
.github/workflows/UpdateReadmeVersion.yaml |
Introduces a scheduled/release-triggered workflow that resolves the latest Maven Central version and updates README dependency snippets accordingly. |
.github/workflows/Release.yaml |
Adds concurrency control around releases, tightens shell settings for tag-derived version extraction, and aligns Java setup quoting/style. |
.github/workflows/CI.yaml |
Normalizes branch list formatting, adjusts permissions, aligns Java setup quoting, and runs build/tests plus snapshot publishing and dependency-submission. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Move badge SVG assets from assets/ to src/main/resources/static/img/ to follow Maven standard resource conventions. This ensures assets are properly included in the JAR and aligns with typical Java project structure. Additionally, add a "Built with Apple Maps Java" showcase section featuring Brief, a terminal AI chat client that demonstrates the library's real-world usage. - Move context7-badge.svg to src/main/resources/static/img/ - Move deepwiki-badge.svg to src/main/resources/static/img/ - Add apple-maps-java-screenshot.png showcasing Brief - Update README badge paths to new resource locations - Add "Built with Apple Maps Java" section with Brief project link
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@README.md`:
- Line 193: The sentence "Apple provides free daily quotas that are currently
significantly more generous* than Google Maps API..." contains an orphaned
asterisk; either remove the asterisk from that sentence or add a matching
footnote explaining the caveat/comparison details; update the README.md sentence
("Apple provides free daily quotas...") to eliminate the dangling marker or
append a clearly labeled footnote entry (e.g., "* Comparison based on X metric,
as of DATE") so the asterisk is resolved.
…ission The explicit permissions block only granted security-events: write, causing all other permissions to default to none. This broke actions/checkout (needs read) and gradle/actions/dependency-submission (needs write). Adding contents: write restores the required access for both steps.
The asterisk after "generous*" had no corresponding footnote, leaving readers confused about what additional context was implied. Removed the asterisk since the comparison to Google Maps API quotas speaks for itself without qualification.
New Features
UpdateReadmeVersion.yamlworkflow fetches the latest release version from Maven Central and updates dependency snippets automatically (runs on release publish and daily schedule)Bug Fixes
contents: writepermission that brokeactions/checkoutandgradle/actions/dependency-submissionCI/CD Improvements
set -euo pipefail)Documentation
APPLE_MAPS_ORIGINconfiguration for JWTs with restricted originssrc/main/resources/static/img/following Maven conventionsFiles Changed
.github/workflows/UpdateReadmeVersion.yaml(new).github/workflows/Release.yaml.github/workflows/CI.yamlREADME.mdsrc/main/resources/static/img/*(badge assets + screenshot)