Merge pull request #152 from ibaiGorordo/main #76
This file contains 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
# This workflow will build the distributions with sdist, bdist_wheel, run tests, format, and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Mapillary Python SDK - Publishing to PyPi | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
pip install wheel build twine readme-renderer check-manifest | |
- name: Setup PyPi RC | |
run: | | |
touch ~/.pypirc | |
cat >> ~/.pypyirc <<EOL | |
[distutils] | |
index-servers = | |
pypi | |
testpypi | |
[testpypi] | |
repository: https://test.pypi.org/legacy | |
username = ${{ secrets.PYPI_USERNAME }} | |
password = ${{ secrets.PYPI_PASSWORD }} | |
[pypi] | |
username = ${{ secrets.PYPI_USERNAME }} | |
password = ${{ secrets.PYPI_PASSWORD }} | |
EOL | |
- name: Uploading To PyPi | |
run: | | |
python3 setup.py upload | |
- name: Publish a Python distribution to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: ${{ secrets.PYPI_USERNAME }} | |
password: ${{ secrets.PYPI_PASSWORD }} |