From 054ad040bbbf7173250f9af5edad04ef63b7d44e Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Wed, 11 Mar 2026 00:46:12 +0000 Subject: [PATCH] add publish+ruff workflows --- .github/workflows/publish.yml | 26 ++++++++++++++++++++++++++ .github/workflows/ruff.yml | 19 +++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 .github/workflows/publish.yml create mode 100644 .github/workflows/ruff.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..899af40 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,26 @@ +name: Publish to PyPI + +on: + release: + types: [published] + push: + tags: + - 'v*.*.*' + +jobs: + pypi-publish: + name: upload release to PyPI + runs-on: ubuntu-latest + environment: pypi + permissions: + # This permission is needed for private repositories. + contents: read + # IMPORTANT: this permission is mandatory for trusted publishing + id-token: write + steps: + - uses: actions/checkout@v4 + + - uses: pdm-project/setup-pdm@v4 + + - name: Publish package distributions to PyPI + run: pdm publish diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml new file mode 100644 index 0000000..4d71024 --- /dev/null +++ b/.github/workflows/ruff.yml @@ -0,0 +1,19 @@ +name: Ruff + +on: + push: + branches: [main] + + pull_request: + branches: [main] + + workflow_dispatch: + +jobs: + ruff: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: astral-sh/ruff-action@v3 + with: + args: 'format --check --diff'