File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7171 - name : Build sdist
7272 run : pipx run build --sdist
7373
74+ - name : Check package
75+ run : |
76+ twine check dist/*.tar.gz
77+
78+ - name : Extract package version
79+ id : extract-version
80+ run : |
81+ SDIST_FILE=$(ls dist/*.tar.gz)
82+ # Extract version from sdist archive (format: mdaencore-1.0.1rc1.tar.gz)
83+ VERSION=$(tar xf ${SDIST_FILE} -O '*/*.egg-info/PKG-INFO' | awk '/^Version:/ {print $2}')
84+ echo "version=$VERSION" >> $GITHUB_OUTPUT
85+ echo "Extracted version: $VERSION"
86+
7487 - name : upload artifacts
7588 if : |
7689 (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) ||
@@ -133,7 +146,7 @@ jobs:
133146 name : testpypi check
134147 runs-on : ${{ matrix.os }}
135148 timeout-minutes : 60
136- needs : upload_testpypi
149+ needs : [ upload_testpypi, build_sdist]
137150 strategy :
138151 fail-fast : false
139152 matrix :
@@ -146,9 +159,12 @@ jobs:
146159 with :
147160 python-version : ${{ matrix.python-version }}
148161
149- - name : pip install
162+ - name : Wait for version to be available on TestPyPI (30 seconds)
163+ run : sleep 30
164+
165+ - name : pip install mdaencore==${{ needs.build_sdist.outputs.version }}
150166 run : |
151- pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple mdaencore
167+ pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple " mdaencore==${{ needs.build_sdist.outputs.version }}
152168
153169 - name : install test deps
154170 run : |
You can’t perform that action at this time.
0 commit comments