File tree Expand file tree Collapse file tree 2 files changed +43
-4
lines changed
Expand file tree Collapse file tree 2 files changed +43
-4
lines changed Original file line number Diff line number Diff line change 1616
1717 - name : Set up Python environment
1818 uses : actions/setup-python@v5
19- with :
19+ with :
2020 python-version : ' 3.8'
2121 cache : ' pip'
2222
@@ -29,11 +29,11 @@ jobs:
2929 sudo pip install flake8
3030 pip install -r requirements.txt -r requirements/dev.txt
3131 working-directory : xero-python
32-
32+
3333 - name : Run Flake8
3434 run : flake8 xero_python
3535 working-directory : xero-python
36-
36+
3737 - name : Build package
3838 run : python setup.py sdist
3939 working-directory : xero-python
4343 # source venv/bin/activate
4444 # pip install -r requirements/test.txt
4545 # pytest -v
46- # working-directory: xero-python
46+ # working-directory: xero-python
Original file line number Diff line number Diff line change 1+ name : Publish
2+ on :
3+ release :
4+ types : [published]
5+
6+ jobs :
7+ publish :
8+ runs-on : ubuntu-latest
9+ steps :
10+ - name : Checkout xero-python repo
11+ uses : actions/checkout@v4
12+ with :
13+ repository : XeroAPI/xero-python
14+ path : xero-python
15+
16+ - name : Set up Python environment
17+ uses : actions/setup-python@v5
18+ with :
19+ python-version : ' 3.8'
20+ cache : ' pip'
21+
22+ - name : Install dependencies
23+ run : |
24+ python -m venv venv
25+ source venv/bin/activate
26+ pip install --upgrade pip
27+ sudo pip install twine
28+ working-directory : xero-python
29+
30+ - name : Build Package
31+ run : python setup.py sdist
32+ working-directory : xero-python
33+
34+ - name : Publish to PyPi
35+ env :
36+ TWINE_USERNAME : __token__
37+ TWINE_PASSWORD : ${{ secrets.PYPI_APIKEY }}
38+ run : twine upload --repository-url https://test.pypi.org/legacy/ dist/*
39+ working-directory : xero-python
You can’t perform that action at this time.
0 commit comments