Skip to content

Add release workflow #2

Add release workflow

Add release workflow #2

Workflow file for this run

name: release-on-main
on:
push:
branches: [main]
jobs:
release:
if: "!startsWith(github.event.head_commit.message, 'chore(release):')"
runs-on: ubuntu-latest
environment:
name: pypi
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.14"
- uses: astral-sh/setup-uv@v7
with:
version: "0.10.4"
- run: uv version --bump patch
- run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add pyproject.toml uv.lock
if ! git diff --staged --quiet; then
git commit -m "chore(release): bump version [skip ci]"
git push
fi
- run: uv build --no-sources
- run: uv publish