Skip to content

Commit

Permalink
Don't actually need separate PyPI build jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
hazmat345 committed Dec 15, 2020
1 parent 154c89b commit 2c8880f
Showing 1 changed file with 3 additions and 43 deletions.
46 changes: 3 additions & 43 deletions .github/workflows/tag-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ on:
- '*'

jobs:
PyPI-sdist:
PyPI:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7']
python-version: ['3.8']
name: Python ${{ matrix.python-version }} PyPi
steps:

Expand Down Expand Up @@ -39,47 +39,7 @@ jobs:
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python setup.py sdist
twine upload dist/*
PyPI-Wheel:
needs: PyPi-sdist
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '2.7', '3.4', '3.5', '3.6', '3.7', '3.8']
name: Python ${{ matrix.python-version }} PyPi
steps:

- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

# Need to update if we support other OS's
- name: Cache PIP Install
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-build-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-pip-build
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python setup.py bdist_wheel
twine upload dist/*
run: make publish-package

Docker:
needs: PyPi-Wheel
Expand Down

0 comments on commit 2c8880f

Please sign in to comment.