Skip to content

Commit

Permalink
feat: github actions workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
walln committed Sep 17, 2024
1 parent d9f03f3 commit 96e40e1
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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


33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 96e40e1

Please sign in to comment.