File tree Expand file tree Collapse file tree 3 files changed +86
-7
lines changed Expand file tree Collapse file tree 3 files changed +86
-7
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy
2+
3+ on :
4+ push :
5+ branches : [main]
6+ pull_request :
7+ release :
8+ types :
9+ - published
10+ workflow_dispatch :
11+
12+ permissions :
13+ contents : read
14+
15+ jobs :
16+ # Always build & lint package.
17+ build-package :
18+ name : Build & verify package
19+ runs-on : ubuntu-latest
20+
21+ steps :
22+ - uses : actions/checkout@v4
23+ with :
24+ fetch-depth : 0
25+
26+ - uses : hynek/build-and-inspect-python-package@v1
27+
28+ # Upload to Test PyPI on every commit on main.
29+ release-test-pypi :
30+ name : Publish in-dev package to test.pypi.org
31+ if : |
32+ github.repository_owner == 'sphinx-contrib'
33+ && github.event_name == 'push'
34+ && github.ref == 'refs/heads/main'
35+ runs-on : ubuntu-latest
36+ needs : build-package
37+
38+ permissions :
39+ id-token : write
40+
41+ steps :
42+ - name : Download packages built by build-and-inspect-python-package
43+ uses : actions/download-artifact@v3
44+ with :
45+ name : Packages
46+ path : dist
47+
48+ - name : Upload package to Test PyPI
49+ uses : pypa/gh-action-pypi-publish@release/v1
50+ with :
51+ repository-url : https://test.pypi.org/legacy/
52+
53+ # Upload to real PyPI on GitHub Releases.
54+ release-pypi :
55+ name : Publish released package to pypi.org
56+ if : |
57+ github.repository_owner == 'sphinx-contrib'
58+ && github.event.action == 'published'
59+ runs-on : ubuntu-latest
60+ needs : build-package
61+
62+ permissions :
63+ id-token : write
64+
65+ steps :
66+ - name : Download packages built by build-and-inspect-python-package
67+ uses : actions/download-artifact@v3
68+ with :
69+ name : Packages
70+ path : dist
71+
72+ - name : Upload package to PyPI
73+ uses : pypa/gh-action-pypi-publish@release/v1
Original file line number Diff line number Diff line change 11[build-system ]
2- requires = [" setuptools" , " wheel" ]
3- build-backend = " setuptools.build_meta"
2+ build-backend = " hatchling.build"
3+ requires = [
4+ " hatch-vcs" ,
5+ " hatchling" ,
6+ ]
47
58[project ]
69name = " sphinx-lint"
@@ -33,10 +36,11 @@ repository = "https://github.com/sphinx-contrib/sphinx-lint"
3336[project .scripts ]
3437sphinx-lint = " sphinxlint.__main__:main"
3538
36- [tool .setuptools ]
37- packages = [" sphinxlint" ]
38- include-package-data = false
39- dynamic.version.attr = " sphinxlint.__version__"
39+ [tool .hatch ]
40+ version.source = " vcs"
41+
42+ [tool .hatch .version .raw-options ]
43+ local_scheme = " no-local-version"
4044
4145[tool .black ]
4246
Original file line number Diff line number Diff line change 11"""Sphinx linter."""
22
3- __version__ = "0.6.8"
3+ import importlib . metadata
44
55from sphinxlint .sphinxlint import check_file , check_text
66
7+ __version__ = importlib .metadata .version ("sphinx_lint" )
8+
79__all__ = ["check_text" , "check_file" ]
You can’t perform that action at this time.
0 commit comments