44 push :
55 branches :
66 - main
7- - v0.23-branch
87 tags :
98 - ' **'
109 pull_request : {}
@@ -14,12 +13,12 @@ jobs:
1413 runs-on : ubuntu-latest
1514
1615 steps :
17- - uses : actions/checkout@v2
16+ - uses : actions/checkout@v4
1817
1918 - name : set up python
20- uses : actions/setup-python@v4
19+ uses : actions/setup-python@v5
2120 with :
22- python-version : ' 3.10 '
21+ python-version : ' 3.11 '
2322
2423 - run : pip install -r requirements/linting.txt -r requirements/pyproject.txt pre-commit
2524
@@ -29,20 +28,20 @@ jobs:
2928 runs-on : ubuntu-latest
3029
3130 steps :
32- - uses : actions/checkout@v2
31+ - uses : actions/checkout@v4
3332
3433 - name : set up python
35- uses : actions/setup-python@v4
34+ uses : actions/setup-python@v5
3635 with :
37- python-version : ' 3.10 '
36+ python-version : ' 3.11 '
3837
3938 - run : pip install -r requirements/docs.txt -r requirements/pyproject.txt
4039 - run : pip install .
4140
4241 - run : make docs
4342
4443 - name : Store docs site
45- uses : actions/upload-artifact@v3
44+ uses : actions/upload-artifact@v4
4645 with :
4746 name : docs
4847 path : docs/_build/
@@ -53,21 +52,21 @@ jobs:
5352 fail-fast : false
5453 matrix :
5554 os : [ubuntu]
56- python : ['3.7 ', '3.8 ', '3.9 ', '3.10 ', '3.11 ']
55+ python : ['3.8 ', '3.9 ', '3.10 ', '3.11 ', '3.12 ']
5756 redis : ['5']
5857 include :
59- - python : ' 3.10 '
58+ - python : ' 3.11 '
6059 redis : ' 6'
6160 os : ' ubuntu'
62- - python : ' 3.10 '
61+ - python : ' 3.11 '
6362 redis : ' 7'
6463 os : ' ubuntu'
6564
6665 env :
6766 PYTHON : ${{ matrix.python }}
6867 OS : ${{ matrix.os }}
6968
70- runs-on : ${{ format('{0}-latest', matrix.os) }}
69+ runs-on : ${{ matrix.os }}-latest
7170
7271 services :
7372 redis :
@@ -77,10 +76,10 @@ jobs:
7776 options : --entrypoint redis-server
7877
7978 steps :
80- - uses : actions/checkout@v2
79+ - uses : actions/checkout@v4
8180
8281 - name : set up python
83- uses : actions/setup-python@v4
82+ uses : actions/setup-python@v5
8483 with :
8584 python-version : ${{ matrix.python }}
8685
@@ -90,50 +89,61 @@ jobs:
9089
9190 - run : coverage xml
9291
93- - uses : codecov/codecov-action@v2
92+ - uses : codecov/codecov-action@v4
9493 with :
9594 file : ./coverage.xml
9695 env_vars : PYTHON,OS
9796
98- deploy :
99- name : Deploy
97+ check :
98+ if : always()
10099 needs : [lint, docs, test]
100+ runs-on : ubuntu-latest
101+
102+ steps :
103+ - name : Decide whether the needed jobs succeeded or failed
104+ uses : re-actors/alls-green@release/v1
105+ id : all-green
106+ with :
107+ jobs : ${{ toJSON(needs) }}
108+
109+ release :
110+ name : Release
111+ needs : [check]
101112 if : " success() && startsWith(github.ref, 'refs/tags/')"
102113 runs-on : ubuntu-latest
114+ environment : release
115+
116+ permissions :
117+ id-token : write
103118
104119 steps :
105- - uses : actions/checkout@v2
120+ - uses : actions/checkout@v4
106121
107122 - name : get docs
108- uses : actions/download-artifact@v3
123+ uses : actions/download-artifact@v4
109124 with :
110125 name : docs
111126 path : docs/_build/
112127
113128 - name : set up python
114- uses : actions/setup-python@v4
129+ uses : actions/setup-python@v5
115130 with :
116- python-version : ' 3.10 '
131+ python-version : ' 3.11 '
117132
118133 - name : install
119- run : pip install -U twine build packaging
134+ run : pip install -U build
120135
121136 - name : check version
122137 id : check-version
123- run : python <(curl -Ls https://gist.githubusercontent.com/samuelcolvin/4e1ad439c5489e8d6478cdee3eb952ef/raw/check_version.py)
124- env :
125- VERSION_PATH : ' arq/version.py'
138+ uses : samuelcolvin/check- python-version@v3.2
139+ with :
140+ version_file_path : ' arq/version.py'
126141
127142 - name : build
128143 run : python -m build
129144
130- - run : twine check dist/*
131-
132- - name : upload to pypi
133- run : twine upload dist/*
134- env :
135- TWINE_USERNAME : __token__
136- TWINE_PASSWORD : ${{ secrets.pypi_token }}
145+ - name : Upload package to PyPI
146+ uses : pypa/gh-action-pypi-publish@release/v1
137147
138148 - name : publish docs
139149 if : ' !fromJSON(steps.check-version.outputs.IS_PRERELEASE)'
0 commit comments