@@ -25,31 +25,34 @@ jobs:
2525 with :
2626 python-version : ${{ matrix.python-version }}
2727
28+ - name : Install setup dependencies
29+ shell : bash
30+ run : pip install build twine
31+
2832 - name : Create Python Dist files
2933 id : create_dist
3034 shell : bash
3135 run : |
3236 # We don't care about the python version used.
33- pip install setuptools wheel
34- python setup.py sdist
35- python setup.py bdist_wheel
37+ python -m build -v
3638 cd dist
3739 echo "sdist=$(ls *.tar.gz)" >> $GITHUB_OUTPUT
3840 echo "wheel=$(ls *.whl)" >> $GITHUB_OUTPUT
3941
4042 - name : Upload Python dist files
4143 uses : actions/upload-artifact@v4
4244 with :
43- name : Python-dist-files
45+ name : psyneulink-${{ github.ref_name }}-dist
4446 path : dist/
45- retention-days : 1
47+ retention-days : 30
48+
49+ - name : Validate dist files
50+ shell : bash
51+ run : twine check --strict dist/*
4652
4753 - name : Upload dist files to test PyPI
4854 shell : bash
4955 run : |
50- # Include implicit dependency on setuptools{,-rust} and preinstall wheel
51- pip install setuptools setuptools-rust wheel
52- pip install twine
5356 # This expects TWINE_USERNAME, TWINE_PASSWORD, and TWINE_REPOSITORY_URL
5457 # environment variables
5558 # It's not possible to condition steps on env or secrets,
6972 strategy :
7073 fail-fast : false
7174 matrix :
72- python-version : ['3.8', '3.9', '3.10', '3.11', '3.12']
75+ python-version : ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13' ]
7376 os : [ubuntu-latest, macos-latest, windows-latest]
7477 dist : [wheel, sdist]
7578
8083 - name : Download dist files
8184 uses : actions/download-artifact@v4
8285 with :
83- name : Python-dist-files
86+ name : psyneulink-${{ github.ref_name }}-dist
8487 path : dist/
8588
8689 - name : Set up Python ${{ matrix.python-version }}
@@ -118,7 +121,7 @@ jobs:
118121 - name : Run tests
119122 shell : bash
120123 # run only tests/. We don't care about codestyle/docstyle at this point
121- timeout-minutes : 80
124+ timeout-minutes : 180
122125 run : |
123126 # remove sources to prevent conflict with the isntalled package
124127 rm -r -f psyneulink/ docs/ bin/ Matlab/
@@ -143,15 +146,20 @@ jobs:
143146 - name : Download dist files
144147 uses : actions/download-artifact@v4
145148 with :
146- name : Python-dist-files
149+ name : psyneulink-${{ github.ref_name }}-dist
147150 path : dist/
148151
152+ - name : Install setup dependencies
153+ shell : bash
154+ run : pip install twine
155+
156+ - name : Validate dist files
157+ shell : bash
158+ run : twine check --strict dist/*
159+
149160 - name : Upload dist files to PyPI
150161 shell : bash
151162 run : |
152- # Include implicit dependency on setuptools{,-rust} and preinstall wheel
153- pip3 install --user setuptools setuptools-rust wheel
154- pip3 install --user twine
155163 # This expects TWINE_USERNAME, TWINE_PASSWORD, and TWINE_REPOSITORY_URL
156164 # environment variables
157165 # It's not possible to condition steps on env or secrets,
@@ -177,13 +185,17 @@ jobs:
177185 - name : Download dist files
178186 uses : actions/download-artifact@v4
179187 with :
180- name : Python-dist-files
188+ name : psyneulink-${{ github.ref_name }}-dist
181189 path : dist/
182190
183191 - name : Upload dist files to release
184192 shell : bash
185193 env :
186194 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
187195 run : |
188- previous_release=$(gh --repo ${{ github.repository }} release list | head -n 1 | awk '{print $1}')
189- gh --repo ${{ github.repository }} release create --generate-notes --notes-start-tag "$previous_release" ${{ github.ref }} dist/*
196+ previous_release=$(gh --repo ${{ github.repository }} release list -L 1 | cut -f1)
197+ if [[ -z "$previous_release" ]]; then
198+ echo "No previous release found"
199+ exit 1
200+ fi
201+ gh --repo ${{ github.repository }} release create --generate-notes --notes-start-tag "$previous_release" ${{ github.ref_name }} dist/*
0 commit comments