Skip to content

Merge branch 'release-6.4.0' #13

Merge branch 'release-6.4.0'

Merge branch 'release-6.4.0' #13

Workflow file for this run

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.hscsec.cnmunity/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 }}