1
+ name : Deploy Packages
2
+ needs : Unit Tests
3
+ on :
4
+ release :
5
+ types :
6
+ - released
7
+ jobs :
8
+ release-python2 :
9
+ runs-on : ubuntu-20.04
10
+ steps :
11
+ - uses : actions/checkout@v2
12
+ - name : install python2 for ubuntu
13
+ run : sudo apt install python2
14
+ - name : get pip script for python2
15
+ run : curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
16
+ - name : install pip for python2
17
+ run : sudo python2 get-pip.py
18
+ - name : install requirements for python2
19
+ run : pip2 install -r requirements-2.txt
20
+ # - name: package and upload
21
+ # env:
22
+ # TWINE_USERNAME: __token__
23
+ # TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
24
+ # PYTHON_DATEMATH_VERSION: ${{ github.event.release.tag_name }}
25
+ # run: |
26
+ # python2.7 setup.py sdist bdist_wheel
27
+ # twine upload dist/*
28
+
29
+ # - name: Publish our Python distribution to PyPI
30
+ # uses: pypa/gh-action-pypi-publish@release/v1
31
+ # with:
32
+ # user: __token__
33
+ # password: ${{ secrets.PYPI_API_TOKEN }}
34
+ # build-python3:
35
+ # runs-on: ubuntu-20.04
36
+ # needs:
37
+ # - build-python2
38
+ # steps:
39
+ # - uses: actions/checkout@v2
40
+ # - name: install requirements for python3
41
+ # run: pip3 install -r requirements-3.txt
42
+ # - name: build the package
43
+ # run: python3 setup.py sdist bdist_wheel
44
+ # - name: Publish our Python distribution to PyPI
45
+ # uses: pypa/gh-action-pypi-publish@release/v1
46
+ # with:
47
+ # user: __token__
48
+ # password: ${{ secrets.PYPI_API_TOKEN }}
0 commit comments