File tree 1 file changed +27
-10
lines changed
1 file changed +27
-10
lines changed Original file line number Diff line number Diff line change @@ -13,10 +13,8 @@ permissions:
13
13
contents : read
14
14
15
15
jobs :
16
- build :
17
-
16
+ test :
18
17
runs-on : ubuntu-latest
19
-
20
18
steps :
21
19
- uses : actions/checkout@v3
22
20
- name : Set up Python 3.10
@@ -27,14 +25,33 @@ jobs:
27
25
run : |
28
26
python setup.py install
29
27
pip install six
30
- # pip install flake8 pytest
31
- # - name: Lint with flake8
32
- # run: |
33
- # # stop the build if there are Python syntax errors or undefined names
34
- # flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
35
- # # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
36
- # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
37
28
- name : Unittest
38
29
run : |
39
30
python -m unittest ocldev/tests/*.py
31
+ pypi-publish :
32
+ needs : [test]
33
+ name : Publish to PyPi
34
+ runs-on : ubuntu-latest
35
+ environment :
36
+ name : pypi
37
+ url : https://pypi.org/p/ocldev
38
+ permissions :
39
+ id-token : write
40
+ steps :
41
+ - uses : actions/checkout@v3
42
+ - name : Set up Python 3.10
43
+ uses : actions/setup-python@v3
44
+ with :
45
+ python-version : " 3.10"
46
+ - name : Install dependencies
47
+ run : |
48
+ pip install --upgrade pip --user
49
+ pip install setuptools==44.1.0 --user
50
+ pip install twine==1.15.0 --user
51
+ - name : Build Wheel
52
+ run : |
53
+ python setup.py sdist bdist_wheel --universal
54
+ twine check dist/*
55
+ - name : Publish package distributions to PyPI
56
+ uses : pypa/gh-action-pypi-publish@release/v1
40
57
You can’t perform that action at this time.
0 commit comments