Skip to content

Commit

Permalink
Add test-release workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
sebpuetz committed Jun 5, 2020
1 parent f3beecb commit b3fcac1
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 5 deletions.
84 changes: 84 additions & 0 deletions .github/workflows/pythonpublish-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Test Upload Python Package
on:
release:
types: [prereleased]

jobs:
deploy-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.6
- name: Build linux wheels
run: |
pip install twine
docker run -v $PWD:/io quay.io/pypa/manylinux1_x86_64 "/io/build_wheels.sh"
- name: Test linux wheel
run: |
pip install dist/finalfusion*36*.whl pytest
pytest
- name: Upload linux wheels
env:
TWINE_USERNAME: ${{ secrets.TEST_PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }}
run: |
twine upload wheelhouse/*.whl --skip-existing --repository testpypi
twine upload dist/*.tar.gz --repository testpypi --skip-existing
deploy-mac:
runs-on: macOS-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Build mac wheel
run: |
python -m pip install --upgrade pip
pip install setuptools wheel==0.31.1 twine cython
python setup.py bdist_wheel
- name: Test mac wheel
run: |
pip install dist/*.whl pytest
pytest
- name: Test mac wheel system python
if: ${{ matrix.python-version == '3.7' }}
run: |
/usr/bin/python3 -m venv venv
source venv/bin/activate
pip install dist/*.whl pytest
pytest
- name: Publish macos
env:
TWINE_USERNAME: ${{ secrets.TEST_PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }}
run: |
twine upload dist/*.whl --repository testpypi --skip-existing
deploy-windows:
runs-on: windows-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Build windows wheel
run: |
python -m pip install --upgrade pip
pip install setuptools wheel==0.31.1 twine cython
python setup.py bdist_wheel
- name: Publish windows
env:
TWINE_USERNAME: ${{ secrets.TEST_PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }}
run: |
twine upload dist\*.whl --repository testpypi --skip-existing
16 changes: 11 additions & 5 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Upload Python Package
on:
release:
types: [published]
types: [released]

jobs:
deploy-linux:
Expand All @@ -12,15 +12,21 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: 3.6
- name: Publish linux
- name: Build linux wheels
run: |
pip install twine
docker run -v $PWD:/io quay.io/pypa/manylinux1_x86_64 "/io/build_wheels.sh"
- name: Test linux wheel
run: |
pip install dist/finalfusion*36*.whl pytest
pytest
- name: Upload linux wheels
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
pip install twine
docker run -v $PWD:/io quay.io/pypa/manylinux1_x86_64 "/io/build_wheels.sh"
twine upload wheelhouse/*.whl --skip-existing
twine upload dist/*.tar.gz
twine upload dist/*.tar.gz --skip-existing
deploy-mac:
runs-on: macOS-latest
strategy:
Expand Down

0 comments on commit b3fcac1

Please sign in to comment.