diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..95da1f5 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,63 @@ +name: Publish to PyPI + +on: + push: + tags: + - "v*" + + # Rerun workflow manually if the publish fails without new tag + workflow_dispatch: + +permissions: + contents: read + +jobs: + build: + name: Build distributions + runs-on: ubuntu-latest + + steps: + - name: Check out repository + uses: actions/checkout@v7 + with: + persist-credentials: false + + - name: Set up Python + uses: actions/setup-python@v7 + with: + python-version: "3.x" + + - name: Install build + run: python3 -m pip install --upgrade build + + - name: Build distributions + run: python3 -m build + + - name: Upload distributions + uses: actions/upload-artifact@v7 + with: + name: distributions + path: dist/ + if-no-files-found: error + + publish: + name: Publish to PyPI + needs: build + runs-on: ubuntu-latest + + environment: + name: release + url: "https://pypi.org/project/python-lsp-ruff" + + permissions: + id-token: write + + steps: + - name: Download distributions + uses: actions/download-artifact@v8 + with: + name: distributions + path: dist/ + + - name: Publish distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/pyproject.toml b/pyproject.toml index c3f0fb7..1290059 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ name = "python-lsp-ruff" authors = [ {name = "Julian Hossbach", email = "julian.hossbach@gmx.de"} ] -version = "2.3.2" +version = "2.3.3" description = "Ruff linting plugin for pylsp" readme = "README.md" requires-python = ">=3.8"