---
name: release-2838f71c9452
description: "Prepare and publish a new cryptobot-python release. Use when the user asks to cut a release, bump the package version, update HISTORY.md, create a git tag, or create a GitHub release."
---

# Release Skill

Create a new release for the cryptobot-python package.

## Usage

```
/release <version>
```

Where `<version>` is the new semantic version (e.g., `0.4.2`, `0.5.0`, `1.0.0`).

## Instructions

When the user invokes this skill with a version number, perform the following steps:

1. **Validate the version**: Ensure the version follows semantic versioning (X.Y.Z format). Reject pre-release or build metadata suffixes unless the user explicitly requests them.

2. **Update version files**:
   - Update the `version` field in `pyproject.toml`:
     ```bash
     sed -i '' 's/^version = ".*"/version = "<version>"/' pyproject.toml
     ```
   - Update `__version__` in `cryptobot/__init__.py`:
     ```bash
     sed -i '' 's/__version__ = ".*"/__version__ = "<version>"/' cryptobot/__init__.py
     ```
   - Verify both files match:
     ```bash
     grep 'version' pyproject.toml | head -1
     grep '__version__' cryptobot/__init__.py
     ```

3. **Ask for release notes**: Ask the user what changes should be included in the release notes.

4. **Update HISTORY.md**: Add a new entry at the top of the History section with the version number, today's date, and the release notes provided by the user.

5. **Run tests**: Execute `make test` to ensure all tests pass before proceeding. Do not continue if tests fail.

6. **Create commit**:
   ```bash
   git add pyproject.toml cryptobot/__init__.py HISTORY.md
   git commit -m "chore(release): prepare v<version> release"
   ```

7. **Create tag**:
   ```bash
   git tag -a "v<version>" -m "v<version>"
   ```

8. **Push commit and tag**:
   ```bash
   git push origin main
   git push origin "v<version>"
   ```

9. **Create GitHub release**:
   ```bash
   gh release create "v<version>" --title "v<version>" --notes "<release-notes>"
   ```
   Use the release notes from the HISTORY.md entry. For multi-line notes, use `--notes-file` with a temporary file instead.

10. **Report completion**: Provide the user with a summary of files changed and a link to the GitHub release.


---
Source attribution: ragnarok22
Original project: https://github.com/ragnarok22/cryptobot_python/blob/adfae4ea2e4bc2831e0c2579216abbb88f566821/skills/release/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Copyright (c) 2022, Reinier Hernández

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: ragnarok22
Original project: https://github.com/ragnarok22/cryptobot_python/blob/adfae4ea2e4bc2831e0c2579216abbb88f566821/skills/release/SKILL.md
Attribution basis: Source repository record

Fields of work: Development & Engineering, Product Management
Roles: Backend Developer, DevOps / SRE, Product Manager
Specialties: Backend, Frontend, Git, Testing
Tools: GitHub
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 1e244e4901e839fad89f16addbe7035fc8dfb7201db396368790dbd0b4c28daa
