|
| 1 | +--- |
| 2 | +name: gh-release |
| 3 | +description: Automates version bumping in pyproject.toml and creating GitHub releases. Use when releasing a new version of the project. |
| 4 | +--- |
| 5 | + |
| 6 | +# GitHub Release Skill |
| 7 | + |
| 8 | +## Overview |
| 9 | + |
| 10 | +This skill automates the process of creating a new release for this Python project. It updates the `version` in `pyproject.toml`, commits the change, and then creates a GitHub release using the `gh` CLI tool. |
| 11 | + |
| 12 | +## Semantic Versioning (SemVer) |
| 13 | + |
| 14 | +This project follows [Semantic Versioning](https://semver.org/) (SemVer) for releasing versions. SemVer uses a `MAJOR.MINOR.PATCH` format: |
| 15 | + |
| 16 | +- **MAJOR** version when you make incompatible API changes. |
| 17 | +- **MINOR** version when you add functionality in a backward compatible manner. |
| 18 | +- **PATCH** version when you make backward compatible bug fixes. |
| 19 | + |
| 20 | +Example: `1.0.0` -> `1.1.0` (new feature), `1.1.0` -> `1.1.1` (bug fix), `1.1.1` -> `2.0.0` (breaking change). |
| 21 | + |
| 22 | +## Usage |
| 23 | + |
| 24 | +To use this skill, execute the `create-release.sh` script from the root of your project with the desired new version number as an argument. |
| 25 | + |
| 26 | +**Example:** |
| 27 | + |
| 28 | +```bash |
| 29 | +.agent/skills/gh-release/scripts/create-release.sh 0.9.1 |
| 30 | +``` |
| 31 | + |
| 32 | +This will perform the following actions: |
| 33 | + |
| 34 | +1. Ensure the working directory is clean and in the `main` branch. |
| 35 | +2. Update the `version` field in `pyproject.toml` to `0.9.1`. |
| 36 | +3. Stage the `pyproject.toml` file. |
| 37 | +4. Commit the change with the message `chore(release): 0.9.1`. |
| 38 | +5. Push the changes to the `main` branch. |
| 39 | +6. Create a GitHub release named `0.9.1` with auto-generated release notes using `gh release create "0.9.1" --generate-notes`. |
| 40 | + |
| 41 | +## Requirements |
| 42 | + |
| 43 | +- `gh` CLI tool must be installed and authenticated. |
| 44 | +- The script should be run from the root of the project repository. |
| 45 | +- The script expects to find `pyproject.toml` in the root. |
| 46 | + |
| 47 | +## Resources |
| 48 | + |
| 49 | +### scripts/ |
| 50 | + |
| 51 | +- `create-release.sh`: The main script that performs the release automation. |
0 commit comments