Skip to content

Commit edf2916

Browse files
committed
ci: use twine to upload packages on pypi
1 parent ce62ca9 commit edf2916

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,19 +275,23 @@ jobs:
275275
git config --global user.email "[email protected]"
276276
git config --global user.name "github-actions"
277277
278-
- name: Install python-semantic-release
279-
run: pip install python-semantic-release
278+
- name: Install python-semantic-release twine
279+
run: pip install python-semantic-release twine
280280

281281
- name: Bump version
282282
run: semantic-release version
283283
env:
284284
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
285285

286+
- name: Upload to pypi
287+
run: twine upload --username "__token__" --password "${PYPI_TOKEN}" dist/*.tar.gz dist/*.whl
288+
env:
289+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
290+
286291
- name: Publish release
287292
run: semantic-release publish
288293
env:
289294
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
290-
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
291295

292296
- name: Merge master to develop
293297
uses: robotology/[email protected]

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
version_variables = ["guessit/__version__.py:__version__"]
33
commit_subject = "chore(release): release v{version}"
44
commit_author = "github-actions <[email protected]>"
5-
upload_to_pypi_glob_patterns = "*.tar.gz,*.whl"
65
build_command = ""
76

87
[tool.check-manifest]

setup.py

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

1818
install_requires = ['rebulk>=3.2.0', 'babelfish>=0.6.0', 'python-dateutil', 'importlib-resources;python_version<"3.9"']
1919

20-
dev_require = ['tox', 'mkdocs', 'mkdocs-material', 'pyinstaller', 'python-semantic-release', 'wheel']
20+
dev_require = ['tox', 'mkdocs', 'mkdocs-material', 'pyinstaller', 'wheel', 'python-semantic-release', 'twine']
2121

2222
tests_require = ['pytest', 'pytest-mock', 'pytest-benchmark', 'pytest-cov', 'pylint', 'PyYAML']
2323

0 commit comments

Comments
 (0)