File tree 2 files changed +43
-4
lines changed
2 files changed +43
-4
lines changed Original file line number Diff line number Diff line change 16
16
17
17
- name : Set up Python environment
18
18
uses : actions/setup-python@v5
19
- with :
19
+ with :
20
20
python-version : ' 3.8'
21
21
cache : ' pip'
22
22
@@ -29,11 +29,11 @@ jobs:
29
29
sudo pip install flake8
30
30
pip install -r requirements.txt -r requirements/dev.txt
31
31
working-directory : xero-python
32
-
32
+
33
33
- name : Run Flake8
34
34
run : flake8 xero_python
35
35
working-directory : xero-python
36
-
36
+
37
37
- name : Build package
38
38
run : python setup.py sdist
39
39
working-directory : xero-python
43
43
# source venv/bin/activate
44
44
# pip install -r requirements/test.txt
45
45
# 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