name: Test and Publish on: [push, pull_request] jobs: deploy: strategy: fail-fast: false matrix: os: [ "ubuntu-latest", "macOS-latest", "windows-latest" ] python-version: [ "3.8", "3.7", "3.6", ] architecture: ["x86", "x64"] timeout-minutes: 30 runs-on: ${{ matrix.os }} name: ${{ matrix.os }} ${{ matrix.architecture }} - ${{ matrix.python-version }} steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | python -m pip install --upgrade pip pip install --upgrade pip wheel setuptools twine pip install pytest lz4 brotli Pillow fsb5 texture2ddecoder - name: Install module run: | python setup.py install - name: Test with pytest run: | pytest -v -s - name: Build and publish if: success() && runner.os != 'Linux' && github.event_name == 'push' env: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} run: | python setup.py sdist bdist_wheel twine upload dist/* --skip-existing