name: CI "on": push: branches: ["**"] pull_request: branches: [master] jobs: lint: name: Lint & type check runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: astral-sh/setup-uv@v5 with: enable-cache: true - run: uv sync --extra cpu --extra dev - run: uv run ruff check . - run: uv run ruff format --check . - run: uv run ty check . test: name: Tests needs: lint runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: astral-sh/setup-uv@v5 with: enable-cache: true - run: uv sync --extra cpu --extra dev - run: uv run pytest build: name: Bump version, build & publish wheel needs: [lint, test] if: github.event_name == 'push' && github.ref == 'refs/heads/master' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: token: ${{ secrets.CI_TOKEN }} - uses: astral-sh/setup-uv@v5 - name: Bump patch version run: | git config user.name "gitea-actions" git config user.email "actions@git.larsbogner.de" uv version --bump patch --no-sync NEW_VERSION=$(uv version --short) git add pyproject.toml uv.lock git commit -m "chore: bump version to ${NEW_VERSION} [skip ci]" git push - run: uv build - name: Publish to Gitea package registry env: TWINE_USERNAME: ${{ secrets.PACKAGE_USERNAME }} TWINE_PASSWORD: ${{ secrets.CI_TOKEN }} run: uvx twine upload --repository-url https://git.larsbogner.de/api/packages/lars/pypi dist/*