|
| 1 | +# Releasing Fable.Python |
| 2 | + |
| 3 | +This document describes the release process for Fable.Python and how to keep versions in sync with Fable. |
| 4 | + |
| 5 | +## Version Synchronization with Fable |
| 6 | + |
| 7 | +Fable.Python versions should stay in sync with Fable. For example, if Fable releases `5.0.0-alpha.20`, Fable.Python should release `5.0.0-alpha.20`. |
| 8 | + |
| 9 | +## Release Process |
| 10 | + |
| 11 | +This project uses [release-please](https://github.com/googleapis/release-please) to automate releases. Release-please creates and maintains a release PR that updates automatically as commits are merged to main. |
| 12 | + |
| 13 | +### Standard Release |
| 14 | + |
| 15 | +When the Fable.Python version naturally aligns with Fable (no version override needed): |
| 16 | + |
| 17 | +1. Merge the release-please PR |
| 18 | +2. The GitHub Action will create a release and tag |
| 19 | + |
| 20 | +### Forcing a Specific Version |
| 21 | + |
| 22 | +When release-please calculates a different version than Fable (e.g., due to `feat:` commits bumping the minor version), you need to override it: |
| 23 | + |
| 24 | +1. Add `release-as` to `release-please-config.json`: |
| 25 | + |
| 26 | +```json |
| 27 | +{ |
| 28 | + "packages": { |
| 29 | + ".": { |
| 30 | + "release-type": "simple", |
| 31 | + "release-as": "5.0.0-alpha.20", |
| 32 | + ... |
| 33 | + } |
| 34 | + } |
| 35 | +} |
| 36 | +``` |
| 37 | + |
| 38 | +2. Update `.release-please-manifest.json` if needed: |
| 39 | + |
| 40 | +```json |
| 41 | +{ |
| 42 | + ".": "5.0.0-alpha.19" |
| 43 | +} |
| 44 | +``` |
| 45 | + |
| 46 | +The manifest represents the *current* released version. Release-please uses this as the baseline. |
| 47 | + |
| 48 | +3. Commit and push to main (or create a PR) |
| 49 | + |
| 50 | +4. Release-please will update its PR to use the specified version |
| 51 | + |
| 52 | +5. **Important**: After the release, remove `release-as` from the config so future releases calculate versions normally |
| 53 | + |
| 54 | +### Hotfix Releases |
| 55 | + |
| 56 | +If you need to release a fix after syncing with Fable (e.g., a bug found in `5.0.0-alpha.20`): |
| 57 | + |
| 58 | +Use the format `5.0.0-alpha.20.1`, `5.0.0-alpha.20.2`, etc. This: |
| 59 | + |
| 60 | +- Clearly shows the relationship to the base version |
| 61 | +- Sorts correctly in package managers |
| 62 | +- Resets when the next Fable version is released |
| 63 | + |
| 64 | +## Configuration Files |
| 65 | + |
| 66 | +- `release-please-config.json` - Release-please configuration (release type, version overrides, extra files to update) |
| 67 | +- `.release-please-manifest.json` - Tracks the current released version |
| 68 | + |
| 69 | +## Conventional Commits |
| 70 | + |
| 71 | +Release-please uses [conventional commits](https://www.conventionalcommits.org/) to determine version bumps: |
| 72 | + |
| 73 | +- `feat:` - Bumps minor version (in pre-major, due to `bump-minor-pre-major: true`) |
| 74 | +- `fix:` - Bumps patch version |
| 75 | +- `chore:`, `docs:`, `style:`, `refactor:`, `test:` - No version bump |
| 76 | + |
| 77 | +When syncing with Fable, the automatic version calculation may not match Fable's version, which is why `release-as` is sometimes needed. |
0 commit comments