|
1 | | -# Releasing Fable.Python |
| 1 | +# Releasing |
2 | 2 |
|
3 | | -## Version Format |
| 3 | +This project uses [EasyBuild.ShipIt](https://github.com/easybuild-org/EasyBuild.ShipIt) |
| 4 | +for release automation and [Conventional Commits](https://www.conventionalcommits.org/) |
| 5 | +for versioning. |
4 | 6 |
|
5 | | -Fable.Python uses the version format `X.Y.Z-alpha.N.P` where: |
| 7 | +## Commit conventions |
6 | 8 |
|
7 | | -- `X.Y.Z-alpha.N` matches the Fable version (e.g., `5.0.0-alpha.22`) |
8 | | -- `P` is the patch version for Fable.Python releases (0, 1, 2, etc.) |
| 9 | +PR titles must follow the conventional commit format (enforced by CI): |
9 | 10 |
|
10 | | -Example: `5.0.0-alpha.22.0`, `5.0.0-alpha.22.1`, `5.0.0-alpha.22.2` |
| 11 | +| Prefix | Version bump | Example | |
| 12 | +| --- | --- | --- | |
| 13 | +| `feat:` | minor | `feat: add Pydantic field validators` | |
| 14 | +| `fix:` | patch | `fix: correct FastAPI response type` | |
| 15 | +| `feat!:` | major | `feat!: rename Flask decorator` | |
| 16 | +| `chore:` | patch | `chore: update dependencies` | |
| 17 | +| `docs:` | patch | `docs: update README` | |
| 18 | +| `refactor:` | patch | `refactor: simplify JSON bindings` | |
11 | 19 |
|
12 | | -## Release Process |
| 20 | +Other valid prefixes: `test`, `perf`, `ci`, `build`, `style`, `revert`. |
13 | 21 |
|
14 | | -1. Go to [GitHub Releases](https://github.com/fable-compiler/Fable.Python/releases) |
15 | | -2. Click **"Draft a new release"** |
16 | | -3. Create a new tag in the format `v5.0.0-alpha.22.0` (with `v` prefix) |
17 | | -4. Set the release title (e.g., `5.0.0-alpha.22.0`) |
18 | | -5. Write release notes (or use "Generate release notes") |
19 | | -6. For pre-release versions, check **"Set as a pre-release"** |
20 | | -7. Click **"Publish release"** |
| 22 | +## Creating a release |
21 | 23 |
|
22 | | -The publish workflow will automatically build and push the NuGet package. |
| 24 | +Releases are driven automatically by the `Publish NuGet` workflow on pushes to |
| 25 | +`main`. ShipIt opens a `chore: release ...` PR that bumps the version in |
| 26 | +`CHANGELOG.md`; merging that PR triggers the publish job, which packs and pushes |
| 27 | +the NuGet package. |
23 | 28 |
|
24 | | -## Syncing with a New Fable Version |
| 29 | +To run ShipIt locally (for example to preview the next version or cut a release |
| 30 | +manually): |
25 | 31 |
|
26 | | -When Fable releases a new version (e.g., `5.0.0-alpha.23`): |
| 32 | +```bash |
| 33 | +just shipit |
| 34 | +``` |
27 | 35 |
|
28 | | -1. Update the codebase to work with the new Fable version |
29 | | -2. Create a release with tag `v5.0.0-alpha.23.0` |
| 36 | +This will: |
30 | 37 |
|
31 | | -## Version History Example |
| 38 | +1. Analyze commits since the last release |
| 39 | +2. Determine the next semantic version |
| 40 | +3. Update `CHANGELOG.md` |
| 41 | +4. Create a GitHub release with the version tag (e.g. `v5.0.0-rc.3`) |
32 | 42 |
|
33 | | -- `5.0.0-alpha.21.0` (initial sync with Fable 5.0.0-alpha.21) |
34 | | -- `5.0.0-alpha.21.1` (first patch) |
35 | | -- `5.0.0-alpha.21.2` (second patch) |
36 | | -- `5.0.0-alpha.22.0` (sync with Fable 5.0.0-alpha.22) |
37 | | -- `5.0.0-alpha.22.1` (first patch for alpha.22) |
| 43 | +Merging a ShipIt release PR (or publishing a release tag) triggers the workflow |
| 44 | +to: |
| 45 | + |
| 46 | +1. Pack the NuGet package (`Fable.Python`) using the version from `CHANGELOG.md` |
| 47 | +2. Push it to nuget.org using the `NUGET_API_KEY` secret |
| 48 | + |
| 49 | +## Prerequisites |
| 50 | + |
| 51 | +- `NUGET_API_KEY` repository secret (glob pattern: `Fable.Python*`) |
| 52 | +- `GITHUB_TOKEN` or `gh` CLI authenticated (for ShipIt to create releases) |
0 commit comments