@@ -19,7 +19,7 @@ concurrency:
1919
2020defaults :
2121 run :
22- shell : bash
22+ shell : bash -l {0}
2323
2424
2525jobs :
@@ -32,18 +32,17 @@ jobs:
3232 fail-fast : false
3333 matrix :
3434 buildplat :
35- - [ubuntu-20.04, manylinux_x86_64, x86_64]
36- - [macos-11, macosx_*, x86_64]
37- - [windows-2019, win_amd64, AMD64]
38- - [macos-14, macosx_*, arm64]
39- python : ["cp39", "cp310", "cp311", "cp312"]
35+ - [ubuntu-22.04, manylinux_x86_64, x86_64]
36+ - [windows-2022, win_amd64, AMD64]
37+ - [macos-15, macosx_*, arm64]
38+ python : ["cp311", "cp312", "cp313", "cp314"]
4039 steps :
41- - uses : actions/checkout@v4
40+ - uses : actions/checkout@v6
4241 with :
4342 fetch-depth : 0
4443
4544 - name : Build wheels
46- uses : pypa/cibuildwheel@v2.16.5
45+ uses : pypa/cibuildwheel@v3.4.0
4746 env :
4847 CIBW_BUILD : ${{ matrix.python }}-${{ matrix.buildplat[1] }}
4948 CIBW_ARCHS : ${{ matrix.buildplat[2] }}
5352 if : |
5453 (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) ||
5554 (github.event_name == 'release' && github.event.action == 'published')
56- uses : actions/upload-artifact@v3
55+ uses : actions/upload-artifact@v7
5756 with :
57+ name : wheel-${{ matrix.buildplat[0] }}-${{ matrix.python }}
5858 path : wheelhouse/*.whl
5959 retention-days : 7
6060
@@ -63,20 +63,32 @@ jobs:
6363 name : build package source distribution
6464 runs-on : ubuntu-latest
6565 timeout-minutes : 10
66+ outputs :
67+ version : ${{ steps.extract-version.outputs.version }}
6668 steps :
67- - uses : actions/checkout@v4
69+ - uses : actions/checkout@v6
6870 with :
6971 fetch-depth : 0
7072
7173 - name : Build sdist
7274 run : pipx run build --sdist
7375
76+ - name : Extract package version
77+ id : extract-version
78+ run : |
79+ SDIST_FILE=$(ls dist/*.tar.gz)
80+ # Extract version from sdist archive (format: mdaencore-1.0.1rc1.tar.gz)
81+ VERSION=$(tar xf ${SDIST_FILE} -O --wildcards '*/*.egg-info/PKG-INFO' | awk '/^Version:/ {print $2}')
82+ echo "version=$VERSION" >> $GITHUB_OUTPUT
83+ echo "Extracted version: $VERSION"
84+
7485 - name : upload artifacts
7586 if : |
7687 (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) ||
7788 (github.event_name == 'release' && github.event.action == 'published')
78- uses : actions/upload-artifact@v3
89+ uses : actions/upload-artifact@v7
7990 with :
91+ name : dist-files
8092 path : dist/*.tar.gz
8193 retention-days : 7
8294
@@ -93,16 +105,16 @@ jobs:
93105 runs-on : ubuntu-latest
94106 needs : [build_wheels, build_sdist]
95107 steps :
96- - uses : actions/download-artifact@v3
108+ - uses : actions/download-artifact@v8
97109 with :
98- name : artifact
99110 path : dist
111+ merge-multiple : true
100112
101113 - name : upload_source_and_wheels
102- uses : pypa/gh-action-pypi-publish@v1.8.10
114+ uses : pypa/gh-action-pypi-publish@v1.14.0
103115 with :
104- skip_existing : true
105- repository_url : https://test.pypi.org/legacy/
116+ skip-existing : true
117+ repository-url : https://test.pypi.org/legacy/
106118
107119 upload_pypi :
108120 if : |
@@ -117,13 +129,13 @@ jobs:
117129 runs-on : ubuntu-latest
118130 needs : [build_wheels, build_sdist]
119131 steps :
120- - uses : actions/download-artifact@v3
132+ - uses : actions/download-artifact@v8
121133 with :
122- name : artifact
123134 path : dist
135+ merge-multiple : true
124136
125137 - name : upload_source_and_wheels
126- uses : pypa/gh-action-pypi-publish@v1.8.10
138+ uses : pypa/gh-action-pypi-publish@v1.14.0
127139
128140 check_testpypi :
129141 if : |
@@ -132,22 +144,25 @@ jobs:
132144 name : testpypi check
133145 runs-on : ${{ matrix.os }}
134146 timeout-minutes : 60
135- needs : upload_testpypi
147+ needs : [ upload_testpypi, build_sdist]
136148 strategy :
137149 fail-fast : false
138150 matrix :
139151 os : [ubuntu-latest, macos-latest, windows-latest]
140- python-version : ["3.9 ", "3.10 ", "3.11 ", "3.12 "]
152+ python-version : ["3.11 ", "3.12 ", "3.13 ", "3.14 "]
141153
142154 steps :
143155 - name : setup python
144- uses : actions/setup-python@v4
156+ uses : actions/setup-python@v6
145157 with :
146158 python-version : ${{ matrix.python-version }}
147159
148- - name : pip install
160+ - name : Wait for version to be available on TestPyPI (30 seconds)
161+ run : sleep 30
162+
163+ - name : pip install mdaencore from testpypi (${{ needs.build_sdist.outputs.version }})
149164 run : |
150- pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple mdaencore
165+ pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple " mdaencore==${{ needs.build_sdist.outputs.version }}"
151166
152167 - name : install test deps
153168 run : |
0 commit comments