|
| 1 | +# Release Process for zod-from-json-schema |
| 2 | + |
| 3 | +This document outlines the steps to create a new release of the package. |
| 4 | + |
| 5 | +## Release Steps |
| 6 | + |
| 7 | +1. **Update package version in package.json**: |
| 8 | + ```bash |
| 9 | + # From the project root directory |
| 10 | + npm version patch # For a bug fix (0.0.x) |
| 11 | + npm version minor # For new features (0.x.0) |
| 12 | + npm version major # For breaking changes (x.0.0) |
| 13 | + ``` |
| 14 | + This will automatically: |
| 15 | + - Update the version in package.json |
| 16 | + - Create a git commit with that change |
| 17 | + - Create a git tag for the version |
| 18 | + |
| 19 | +2. **Push the changes and tag**: |
| 20 | + ```bash |
| 21 | + git push origin main --tags |
| 22 | + ``` |
| 23 | + |
| 24 | +3. **Create a GitHub Release**: |
| 25 | + - Go to the "Releases" section of your GitHub repository |
| 26 | + - Click "Draft a new release" |
| 27 | + - Select the tag you just pushed (should match the version in package.json) |
| 28 | + - Add a title and description for the release |
| 29 | + - Click "Publish release" |
| 30 | + |
| 31 | +4. **Monitor the GitHub Actions workflow**: |
| 32 | + - The publish workflow will trigger automatically when the release is created |
| 33 | + - It will verify that the package version matches the release tag |
| 34 | + - It will build, test, and publish the package to npm |
| 35 | + - You can monitor progress in the "Actions" tab of your GitHub repository |
| 36 | + |
| 37 | +## Important Notes |
| 38 | + |
| 39 | +- The version in package.json determines what version is published to npm |
| 40 | +- The GitHub release tag should match the version in package.json (with or without a leading 'v') |
| 41 | +- If there is a mismatch, the workflow will warn you but will still publish using the version in package.json |
| 42 | +- Make sure to update the CHANGELOG.md file before creating a release |
0 commit comments