ci: use twine to upload packages on pypi

This commit is contained in:
Rémi Alvergnat
2023-12-14 10:50:26 +01:00
parent ce62ca94a2
commit edf29168a1
3 changed files with 8 additions and 5 deletions

View File

@@ -275,19 +275,23 @@ jobs:
git config --global user.email "action@github.com"
git config --global user.name "github-actions"
- name: Install python-semantic-release
run: pip install python-semantic-release
- name: Install python-semantic-release twine
run: pip install python-semantic-release twine
- name: Bump version
run: semantic-release version
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload to pypi
run: twine upload --username "__token__" --password "${PYPI_TOKEN}" dist/*.tar.gz dist/*.whl
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
- name: Publish release
run: semantic-release publish
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
- name: Merge master to develop
uses: robotology/gh-action-nightly-merge@v1.4.0

View File

@@ -2,7 +2,6 @@
version_variables = ["guessit/__version__.py:__version__"]
commit_subject = "chore(release): release v{version}"
commit_author = "github-actions <actions@github.com>"
upload_to_pypi_glob_patterns = "*.tar.gz,*.whl"
build_command = ""
[tool.check-manifest]

View File

@@ -17,7 +17,7 @@ with io.open(os.path.join(here, 'CHANGELOG.md'), encoding='utf-8') as f:
install_requires = ['rebulk>=3.2.0', 'babelfish>=0.6.0', 'python-dateutil', 'importlib-resources;python_version<"3.9"']
dev_require = ['tox', 'mkdocs', 'mkdocs-material', 'pyinstaller', 'python-semantic-release', 'wheel']
dev_require = ['tox', 'mkdocs', 'mkdocs-material', 'pyinstaller', 'wheel', 'python-semantic-release', 'twine']
tests_require = ['pytest', 'pytest-mock', 'pytest-benchmark', 'pytest-cov', 'pylint', 'PyYAML']