Skip to content

Commit 9058d2d

Browse files
committed
update release
1 parent a0bb026 commit 9058d2d

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

.github/workflows/tests.yml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,20 @@ jobs:
3535
pip install pytest
3636
pytest tests/
3737
38-
- name: Build package
39-
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
40-
run: |
41-
pip install wheel
42-
python setup.py sdist bdist_wheel
43-
- name: Publish to PyPi
44-
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
45-
uses: pypa/[email protected]
46-
with:
47-
user: __token__
48-
password: ${{ secrets.PYPI_KEY }}
38+
publish:
39+
40+
name: Publish to PyPi
41+
needs: build
42+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
43+
runs-on: ubuntu-latest
44+
steps:
45+
- name: Build package
46+
47+
run: |
48+
pip install wheel
49+
python setup.py sdist bdist_wheel
50+
- name: Publish
51+
uses: pypa/[email protected]
52+
with:
53+
user: __token__
54+
password: ${{ secrets.PYPI_KEY }}

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
def get_version():
88
text = Path(__file__).parent.joinpath("markdown_it", "__init__.py").read_text()
9-
match = re.compile(r"^__version__\s*\=\s*([^\s]+)", re.M).search(text)
9+
match = re.compile(r"^__version__\s*\=\s*[\"\']([^\s\'\"]+)", re.M).search(text)
1010
return match.group(1)
1111

1212

0 commit comments

Comments
 (0)