feat: automated versioning and docs site sync - #76
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
🚅 Deployed to the nexus-pr-76 environment in nexus
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds automated versioning with release-please, makes the API report the released version, and builds the seam that pushes our docs content to
docs.ethanshih.comon release.Versioning is SemVer with a flat
-betasuffix during the pilot year (v1.0.0-beta→v1.1.0-betaon afeat), not an incrementingbeta.N. The first release is pinned tov1.0.0-beta.What changed
Backend
Schemas and routes
/docs) and Scalar (/reference) are served only whenAPP_ENVisdevelopmentorpreview. Production serves just/openapi.json, which the docs site renders.https://docs.ethanshih.comso the docs site's API reference can read the spec.Logic
main.pyreadsbackend/VERSIONinstead of hardcoding0.2.0, so the OpenAPI spec reports the released version.backend/so a backend-only deploy ships it, and falls back to0.0.0-unknownrather than failing startup if it's missing.Release automation
release-please-config.json/.release-please-manifest.json—simplerelease type at the repo root, so backend-only commits still trigger releases.version-filewritesbackend/VERSION; anextra-filesJSON updater writesfrontend/package.json.skip-changelog: true— noCHANGELOG.mdis committed. The GitHub release keeps release-please's generated commit list as the dev-facing changelog.release-as: "1.0.0-beta"— one-time pin for the first release. Remove it after that release ships, or every later release stays pinned..github/workflows/release-please.ymlopens the release PR on pushes tomain.dispatch-docsjob fires arepository_dispatchtoethnjs/docswhen a release publishes, with{ repo, tag, version }. It's a second job in the same workflow because releases created withGITHUB_TOKENdon't trigger separate workflows. It uses theDOCS_SITE_DISPATCH_TOKENPAT and requests no repo permissions of its own.docs/now holds synced content (getting-started.mdx) and is no longer gitignored.CONTRIBUTING.mddocuments Conventional Commits with a type-to-version-bump table, the versioning scheme, "Cutting a release", and the docs content rules..github/RELEASE_NOTES_TEMPLATE.mdxis the starting point for the per-release user-facing page indocs/release-notes/.Out of scope
ethnjs/docs— sync workflow, sidebar config, release notes landing page.Test plan
pytestpasses locally — not run; no test touches the changed routes.Automated
APP_ENV.Manual
APP_ENVofdevelopment,preview,production, andtest— dev and preview serve/docs,/reference, and/openapi.json; production and test serve only/openapi.json.main.pyresolvesbackend/VERSIONand reads0.1.0.release-please-config.json,.release-please-manifest.json, and the workflow YAML.-betasuffix forward while still bumping the core version, and that theprereleasestrategy would instead producebeta.N.Not testable until this is on
main— both read config from the default branch:ethnjs/docs.