Skip to content

Commit

Permalink
Create publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurGW committed Dec 17, 2019
1 parent f58aedf commit fedac80
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: publish

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.7'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[build]
pip install flake8 twine
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 simplequi --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 tests --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 simplequi --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with test script (Ubuntu)
env:
QT_QPA_PLATFORM: offscreen
NO_AUDIO: 1
run: |
cd tests
python run_all_tests.py
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*

0 comments on commit fedac80

Please sign in to comment.