diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..7594aa8 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,36 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + quality-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Install the latest version of uv + uses: astral-sh/setup-uv@v2 + with: + version: "latest" + enable-cache: true + + - name: Sync Deps + run: uv sync + + - name: Lint + run: uv run ruff check + + - name: Format + run: uv run ruff format --check + + - name: Type Check + run: uv run mypy src + + - name: Test + run: uv run pytest + + \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..fe2aebf --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,33 @@ +# Release a new version of the project to PyPI +# To trigger this workflow manually, run the following command: +# gh workflow run release.yml -f tag=v1.0.0 +# or git tag 1.0.0 && git push origin --tags + +name: Publish Release + +on: + push: + tags: + - '*' + +jobs: + build-and-publish: + name: Build and publish + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Install the latest version of uv + uses: astral-sh/setup-uv@v2 + with: + version: "latest" + enable-cache: true + + - name: Sync Deps + run: uv sync + + - name: Build + run: uv build + + - name: Publish + run: uvx twine upload dist \ No newline at end of file