1
1
name : Publishing
2
2
3
- on :
4
- push :
5
- tags :
6
- - ' *'
3
+ # on:
4
+ # push:
5
+ # tags:
6
+ # - '*'
7
+
8
+ on : [push, pull_request, workflow_dispatch]
7
9
8
10
jobs :
9
11
10
12
tests :
11
13
name : Run tests
12
- runs-on : ubuntu-18 .04
14
+ runs-on : ubuntu-20 .04
13
15
steps :
14
16
- uses : actions/checkout@v2
15
17
- uses : actions/setup-python@v2
16
18
with :
17
- python-version : 3.9
19
+ python-version : 3.10
18
20
- run : pip install tox
19
21
- run : tox
20
22
env :
21
- TOXENV : 3.9
23
+ TOXENV : 3.10
22
24
23
25
linters :
24
26
name : Run linters
25
- runs-on : ubuntu-18 .04
27
+ runs-on : ubuntu-20 .04
26
28
strategy :
27
29
matrix :
28
30
toxenv : [flake8, pydocstyle, mypy, pylint]
29
31
steps :
30
32
- uses : actions/checkout@v2
31
33
- uses : actions/setup-python@v2
32
34
with :
33
- python-version : 3.9
35
+ python-version : 3.10
34
36
- run : pip install tox
35
37
- run : tox
36
38
env :
@@ -39,12 +41,12 @@ jobs:
39
41
build-sdist :
40
42
name : Build source tarball
41
43
needs : [tests, linters]
42
- runs-on : ubuntu-18 .04
44
+ runs-on : ubuntu-20 .04
43
45
steps :
44
46
- uses : actions/checkout@v2
45
47
- uses : actions/setup-python@v2
46
48
with :
47
- python-version : 3.9
49
+ python-version : 3.10
48
50
- run : python setup.py sdist
49
51
- uses : actions/upload-artifact@v2
50
52
with :
@@ -56,15 +58,15 @@ jobs:
56
58
runs-on : ${{ matrix.os }}
57
59
strategy :
58
60
matrix :
59
- os : [ubuntu-18 .04, windows-latest, macos-latest ]
61
+ os : [ubuntu-20 .04, windows-2019, macOS-10.15 ]
60
62
env :
61
63
CIBW_SKIP : cp27-win*
62
64
steps :
63
65
- uses : actions/checkout@v2
64
66
- uses : actions/setup-python@v2
65
67
with :
66
- python-version : 3.9
67
- - run : pip install cibuildwheel==1.8.0
68
+ python-version : 3.10
69
+ - run : pip install cibuildwheel==2.1.3
68
70
- run : cibuildwheel --output-dir wheelhouse
69
71
- uses : actions/upload-artifact@v2
70
72
with :
@@ -73,15 +75,15 @@ jobs:
73
75
build-wheels-linux-aarch64 :
74
76
name : Build wheels (ubuntu-latest-aarch64)
75
77
needs : [tests, linters]
76
- runs-on : ubuntu-18 .04
78
+ runs-on : ubuntu-20 .04
77
79
steps :
78
80
- uses : actions/checkout@v2
79
81
- name : Set up QEMU
80
82
uses : docker/setup-qemu-action@v1
81
83
- uses : actions/setup-python@v2
82
84
with :
83
- python-version : 3.9
84
- - run : pip install cibuildwheel==1.8.0
85
+ python-version : 3.10
86
+ - run : pip install cibuildwheel==2.1.3
85
87
- run : cibuildwheel --archs aarch64 --output-dir wheelhouse
86
88
- uses : actions/upload-artifact@v2
87
89
with :
90
92
publish :
91
93
name : Publish on PyPI
92
94
needs : [build-sdist, build-wheels, build-wheels-linux-aarch64]
93
- runs-on : ubuntu-18 .04
95
+ runs-on : ubuntu-20 .04
94
96
steps :
95
97
- uses : actions/download-artifact@v2
96
98
with :
@@ -99,26 +101,27 @@ jobs:
99
101
- uses : pypa/gh-action-pypi-publish@master
100
102
with :
101
103
user : __token__
102
- password : ${{ secrets.PYPI_API_TOKEN }}
104
+ password : ${{ secrets.TEST_PYPI_API_TOKEN }}
105
+ repository_url : https://test.pypi.org/legacy/
103
106
104
- publish-docs :
105
- name : Publish docs
106
- needs : [publish]
107
- runs-on : ubuntu-18.04
108
- steps :
109
- - uses : actions/checkout@v2
110
- - uses : actions/setup-python@v2
111
- with :
112
- python-version : 3.9
113
- - run : pip install -r requirements-doc.txt
114
- - run : pip install awscli
115
- - run : pip install -e .
116
- - run : (cd docs && make clean html)
117
- - run : |
118
- aws s3 sync docs/_build/html s3://python-dependency-injector-docs --delete
119
- aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }} --path "/*" > /dev/null
120
- echo "Cache invalidation triggered"
121
- env:
122
- AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
123
- AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
124
- AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
107
+ # publish-docs:
108
+ # name: Publish docs
109
+ # needs: [publish]
110
+ # runs-on: ubuntu-18.04
111
+ # steps:
112
+ # - uses: actions/checkout@v2
113
+ # - uses: actions/setup-python@v2
114
+ # with:
115
+ # python-version: 3.10
116
+ # - run: pip install -r requirements-doc.txt
117
+ # - run: pip install awscli
118
+ # - run: pip install -e .
119
+ # - run: (cd docs && make clean html)
120
+ # - run: |
121
+ # aws s3 sync docs/_build/html s3://python-dependency-injector-docs --delete
122
+ # aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }} --path "/*" > /dev/null
123
+ # echo "Cache invalidation triggered"
124
+ # env:
125
+ # AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
126
+ # AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
127
+ # AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
0 commit comments