Merge pull request #49 from craigk/setup-fix #66
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: deploy | |
| on: push | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-n-publish-source: | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.event.ref, 'refs/tags') | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Python 3.7 | |
| uses: actions/setup-python@v1 | |
| with: | |
| python-version: 3.7 | |
| - name: Upgrade Setuptools | |
| run: pip install setuptools --upgrade | |
| - name: Build xtcocotools | |
| run: | | |
| pip install -r requirements.txt | |
| pip install --upgrade wheel | |
| python setup.py sdist | |
| - name: Publish distribution 📦 to PyPI | |
| run: | | |
| pip install --upgrade twine | |
| twine upload dist/* -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} | |
| build-n-publish-linux: | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.event.ref, 'refs/tags') | |
| strategy: | |
| matrix: | |
| python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v1 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Upgrade Setuptools | |
| run: pip install setuptools --upgrade | |
| - name: Build xtcocotools | |
| run: | | |
| pip install -r requirements.txt | |
| pip install --upgrade wheel | |
| python setup.py bdist_wheel --plat-name manylinux1_x86_64 | |
| - name: Publish distribution 📦 to PyPI | |
| run: | | |
| pip install --upgrade twine | |
| twine upload dist/*.whl -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} | |
| build-n-publish-mac: | |
| runs-on: macos-latest | |
| if: startsWith(github.event.ref, 'refs/tags') | |
| strategy: | |
| matrix: | |
| python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v1 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Upgrade Setuptools | |
| run: pip install setuptools --upgrade | |
| - name: Build xtcocotools | |
| run: | | |
| pip install -r requirements.txt | |
| pip install --upgrade wheel | |
| python setup.py bdist_wheel | |
| - name: Publish distribution 📦 to PyPI | |
| run: | | |
| pip install --upgrade twine | |
| twine upload dist/*.whl -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} | |
| build-n-publish-windows: | |
| runs-on: windows-latest | |
| if: startsWith(github.event.ref, 'refs/tags') | |
| strategy: | |
| matrix: | |
| python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v1 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Upgrade Setuptools | |
| run: pip install setuptools --upgrade | |
| - name: Build xtcocotools | |
| run: | | |
| pip install -r requirements.txt | |
| pip install --upgrade wheel | |
| python setup.py bdist_wheel | |
| # - name: Publish distribution 📦 to Test PyPI | |
| # run: | | |
| # pip install --upgrade twine | |
| # twine upload --repository testpypi dist/*.whl -u __token__ -p ${{ secrets.TEST_PYPI_API_TOKEN }} | |
| - name: Publish distribution 📦 to PyPI | |
| run: | | |
| pip install --upgrade twine | |
| twine upload dist/*.whl -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} |