<commit_before>name: Release to PyPI

on:
  push:
    branches:
      - release
    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

      - name: Build tarball
        run: |
          . venv/bin/activate
          python setup.py sdist bdist_wheel

      - name: Upload tarball to PyPI
        run: |<commit_msg>update release.yml<commit_after>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

      - name: Build tarball and wheel
        run: |
          . venv/bin/activate
          pip install wheel
          python setup.py sdist bdist_wheel

      - name: Upload tarball to PyPI
        run: |
{'fraction_non_alphanumeric': 0.11153662039253232, 'fraction_numerical': 0.014360938247965534, 'mean_word_length': 1.7427821522309712, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4200868', 'n_tokens_mistral': 718, 'n_tokens_neox': 671, 'n_words': 160}