This document describes the automated release process for the HyperFleet API specification.
Releases are fully automated via GitHub Actions. When a PR is merged to main, the release workflow (.github/workflows/release.yml) automatically creates a versioned GitHub Release with all schema artifacts attached.
Manual tagging or asset uploads are no longer required.
We follow Semantic Versioning:
- MAJOR version: Incompatible API changes (breaking changes)
- MINOR version: Backward-compatible functionality additions
- PATCH version: Backward-compatible bug fixes
Examples:
- Breaking change (removed endpoint, changed required field):
v1.0.0->v2.0.0 - New endpoint added:
v1.0.0->v1.1.0 - Documentation fix, typo correction:
v1.0.0->v1.0.1
- Bump the version in
main.tsp(the@infodecorator'sversionfield) - Update
CHANGELOG.mdwith the new version and changes - Build all schemas:
npm run build:all - Commit the version bump, changelog, and regenerated schemas
- Open a PR and merge to
main
The CI workflow enforces that the version in main.tsp has been bumped from the latest release tag. If the version is unchanged, CI will fail and block the merge.
On every push to main, the release workflow:
- Extracts the version from
main.tsp - Skips if a Git tag for that version already exists (idempotent)
- Builds all four schema variants from TypeSpec sources
- Creates an annotated Git tag (
vX.Y.Z) - Publishes a GitHub Release with auto-generated release notes and four artifacts:
core-openapi.yaml(OpenAPI 3.0)core-swagger.yaml(OpenAPI 2.0)gcp-openapi.yaml(OpenAPI 3.0)gcp-swagger.yaml(OpenAPI 2.0)
The CI workflow (.github/workflows/ci.yml) runs on every PR and push to main:
- Schema consistency - Rebuilds all schemas and verifies they match committed files
- OpenAPI linting - Runs
spectral lintagainst thespectral:oasruleset - Version bump check - Compares the version in
main.tspagainst the latest release tag
Downstream Go consumers can import schemas directly:
import specschemas "github.com/openshift-hyperfleet/hyperfleet-api-spec/schemas"
data, err := specschemas.FS.ReadFile("gcp/openapi.yaml")Latest release (always points to newest):
- Core:
https://github.com/openshift-hyperfleet/hyperfleet-api-spec/releases/latest/download/core-openapi.yaml - GCP:
https://github.com/openshift-hyperfleet/hyperfleet-api-spec/releases/latest/download/gcp-openapi.yaml
Specific version:
- Core:
https://github.com/openshift-hyperfleet/hyperfleet-api-spec/releases/download/vX.Y.Z/core-openapi.yaml - GCP:
https://github.com/openshift-hyperfleet/hyperfleet-api-spec/releases/download/vX.Y.Z/gcp-openapi.yaml
Bump the version in main.tsp before merging. The CI requires each merge to main to carry a new version number.
Check that the version in main.tsp is new (no existing Git tag). The workflow is idempotent and skips if the tag already exists. Verify with:
git ls-remote --tags origin | grep vX.Y.ZGitHub determines "latest" by semantic versioning, not chronological order. Ensure the new version number is higher than all existing tags and the release is not marked as a pre-release.
- Versioning discipline: Never delete or modify published releases
- Pre-releases: Use pre-release tags for testing (
v1.0.0-rc1,v1.0.0-beta.1) - Review before merge: Schema changes affect downstream consumers; review generated output carefully