<commit_before><commit_msg>Create PyPi Upload Action (#186)<commit_after># This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Publish to PyPi

on:
  release:
    types: [created]

jobs:
  deploy:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: [2.7, 3.x]

    steps:
    - uses: actions/checkout@v2
    - name: Publish to PyPi
      uses: actions/setup-python@v1
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install setuptools wheel twine
    - name: Build
      run: |
        python setup.py bdist_wheel
    - name: Build Sources
      run: |
        python setup.py sdist
      if: ${{ matrix.python-version }} == '3.x'
    - name: Publish
      env:
        TWINE_USERNAME: __token__
        TWINE_PASSWORD: ${{ secrets.pypi_secret }}
      run: |
        twine check dist/*
        twine upload dist/*

{'fraction_non_alphanumeric': 0.10371650821089023, 'fraction_numerical': 0.007778738115816767, 'mean_word_length': 2.356521739130435, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2953293', 'n_tokens_mistral': 370, 'n_tokens_neox': 356, 'n_words': 98}