diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..0770ff7 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,51 @@ +name: Release + +on: + push: + tags: + - 'v*' + +jobs: + release: + name: Create Release + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Install uv + uses: astral-sh/setup-uv@v5 + + - name: Read Python version + run: echo "PYTHON_VERSION=$(cat .python-version | tr -d '\n')" >> $GITHUB_ENV + + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: ${{ env.PYTHON_VERSION }} + + - name: Install dependencies + run: uv sync + + - name: Run CI checks + run: make ci + + - name: Run tests + run: make test + + - name: Build package + run: uv build + + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + files: dist/* + generate_release_notes: true + draft: false + prerelease: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/CLAUDE.md b/CLAUDE.md index 875e4f1..ecd977c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -32,6 +32,11 @@ uv sync # Install dependencies (not pip install) uv add # Add new dependency uv run python # Run Python files uv run pytest path/to/test.py # Run specific test + +# Release +# 1. Update version in pyproject.toml +# 2. Tag the commit: git tag -a v0.1.0 -m "Release v0.1.0" +# 3. Push the tag: git push origin v0.1.0 (triggers Release workflow) ``` ## Architecture