Skip to content

Commit 267f9db

Browse files
authored
Create pypi-publish.yaml
1 parent 32dfcc8 commit 267f9db

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# This workflow will build the distributions with sdist, bdist_wheel, run tests, format, and lint with a single version of Python
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: Mapillary Python SDK - PyTest Workflow
5+
6+
on:
7+
push:
8+
branches: [ main ]
9+
10+
jobs:
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- users: actions/checkout@v2
17+
- name: Set up Python 3.9
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: 3.9
21+
22+
- name: Install dependencies
23+
run: |
24+
python3 -m pip install --upgrade pip
25+
pip install sdist bdist_wheel twine toml
26+
27+
- name: Setup PyPi RC
28+
run: |
29+
touch ~/.pypirc
30+
echo <<<EOT >> ~/.pypyirc
31+
[distutils]
32+
index-servers =
33+
pypi
34+
testpypi
35+
36+
[testpypi]
37+
repository: https://test.pypi.org/legacy
38+
username = ${{ secrets.PYPI_USERNAME }}
39+
password = ${{ secrets.PYPI_PASSWORD }}
40+
41+
[pypi]
42+
username = ${{ secrets.PYPI_USERNAME }}
43+
password = ${{ secrets.PYPI_PASSWORD }}
44+
EOT
45+
46+
- name: Uploading To PyPi
47+
run: |
48+
python3 setup.py upload
49+
50+
- name: Publish a Python distribution to PyPI
51+
uses: pypa/gh-action-pypi-publish@release/v1
52+
with:
53+
user: ${{ secrets.PYPI_USERNAME }}
54+
password: ${{ secrets.PYPI_PASSWORD }}

0 commit comments

Comments
 (0)