Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Release

on:
push:
tags:
- "v[0-9]+.*"

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install hatch
- name: Build
run: |
python -m hatch version "${GITHUB_REF_NAME}"
python -m hatch build
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: dist-artifacts
path: dist/

publish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: dist-artifacts
path: dist/
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
1 change: 1 addition & 0 deletions pylsp_isort/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from pylsp_isort._version import __version__ # noqa: F401
1 change: 1 addition & 0 deletions pylsp_isort/_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "0.0.0"
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ build-backend = "hatchling.build"

[project]
name = "python-lsp-isort"
version = "0.2.0"
authors = [
{name = "Hiroki Teranishi", email = "teranishi.hiroki@gmail.com"}
]
Expand All @@ -16,6 +15,7 @@ dependencies = [
"python-lsp-server",
"isort>=5.0",
]
dynamic = ["version"]

[project.urls]
Homepage = "https://github.com/chantera/python-lsp-isort"
Expand All @@ -39,6 +39,9 @@ only-packages = true
[tool.hatch.build.targets.wheel]
packages = ["pylsp_isort"]

[tool.hatch.version]
path = "pylsp_isort/_version.py"

[tool.ruff]
line-length = 99
extend-exclude = ["tests/fixtures/*"]
Expand Down
Loading