Merge branch 'release-7.0.4' #18
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release to PyPI | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
jobs: | |
tarball: | |
if: github.event_name == 'push' | |
timeout-minutes: 1 | |
runs-on: ubuntu-20.04 | |
env: | |
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/setup-python@v1 | |
with: | |
python-version: "3.8.x" | |
# https://github.community/t/how-to-get-just-the-tag-name/16241/4 | |
- name: Extract the version number | |
id: get_version | |
run: | | |
echo ::set-output name=V::$(python smart_open/version.py) | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m venv venv | |
. venv/bin/activate | |
pip install twine wheel | |
- name: Build and upload tarball to PyPI | |
run: | | |
. venv/bin/activate | |
python setup.py sdist | |
twine upload dist/smart_open-${{ steps.get_version.outputs.V }}.tar.gz -u ${{ env.PYPI_USERNAME }} -p ${{ env.PYPI_PASSWORD }} | |
- name: Build and upload wheel to PyPI | |
run: | | |
. venv/bin/activate | |
python setup.py bdist_wheel | |
twine upload dist/smart_open-${{ steps.get_version.outputs.V }}-py3-none-any.whl -u ${{ env.PYPI_USERNAME }} -p ${{ env.PYPI_PASSWORD }} |