name: Upload Python package

on:
  push:
    tags:
    - 1*
    - v*

jobs:
  deploy:
    runs-on: ubuntu-latest
    if: github.repository == 'mnubo/kubernetes-py'
    steps:
    - uses: actions/checkout@v2
    - run: |
        git fetch --prune --unshallow
    - name: Set up Python
      uses: actions/setup-python@v1
      with:
        python-version: '3.8'
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install pipenv==2018.11.26
        pipenv install --dev --system
    - name: Build and publish
      if: github.repository == 'mnubo/kubernetes-py'
      env:
        TWINE_USERNAME: __token__
        TWINE_PASSWORD: ${{ secrets.pypi_password }}
      run: |
        python setup.py sdist bdist_wheel
        twine upload dist/*

name: Upload Python package

on:
  push:
    tags:
    - '1*'
    - 'v*'

jobs:
  deploy:
    runs-on: ubuntu-latest
    if: github.repository == 'mnubo/kubernetes-py'
    steps:
    - uses: actions/checkout@v2
    - run: |
        git fetch --prune --unshallow
    - name: Set up Python
      uses: actions/setup-python@v1
      with:
        python-version: '3.8'
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install pipenv==2018.11.26
        pipenv install --dev --system
    - name: Build and publish
      if: github.repository == 'mnubo/kubernetes-py'
      env:
        TWINE_USERNAME: __token__
        TWINE_PASSWORD: ${{ secrets.pypi_password }}
      run: |
        python setup.py sdist bdist_wheel
        twine upload dist/*

Test if we can act on tag.
fix(ci): Test if we can act on tag.

That even if bot pushed it.