Skip to content

Commit d379a76

Browse files
authored
Merge pull request #87 from Miyamura80/feat/release-automation
⚙️ add automated release workflow
2 parents 3983b96 + e534f95 commit d379a76

2 files changed

Lines changed: 56 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
release:
10+
name: Create Release
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Install uv
21+
uses: astral-sh/setup-uv@v5
22+
23+
- name: Read Python version
24+
run: echo "PYTHON_VERSION=$(cat .python-version | tr -d '\n')" >> $GITHUB_ENV
25+
26+
- name: Set up Python
27+
uses: actions/setup-python@v6
28+
with:
29+
python-version: ${{ env.PYTHON_VERSION }}
30+
31+
- name: Install dependencies
32+
run: uv sync
33+
34+
- name: Run CI checks
35+
run: make ci
36+
37+
- name: Run tests
38+
run: make test
39+
40+
- name: Build package
41+
run: uv build
42+
43+
- name: Create GitHub Release
44+
uses: softprops/action-gh-release@v2
45+
with:
46+
files: dist/*
47+
generate_release_notes: true
48+
draft: false
49+
prerelease: false
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CLAUDE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ uv sync # Install dependencies (not pip install)
3232
uv add <pkg> # Add new dependency
3333
uv run python <file> # Run Python files
3434
uv run pytest path/to/test.py # Run specific test
35+
36+
# Release
37+
# 1. Update version in pyproject.toml
38+
# 2. Tag the commit: git tag -a v0.1.0 -m "Release v0.1.0"
39+
# 3. Push the tag: git push origin v0.1.0 (triggers Release workflow)
3540
```
3641

3742
## Architecture

0 commit comments

Comments
 (0)