@@ -22,13 +22,13 @@ jobs:
2222 contents : read
2323 runs-on : ubuntu-24.04
2424 steps :
25- - uses : actions/checkout@v6
25+ - uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2626 with :
2727 persist-credentials : false
28- - uses : actions/setup-python@v6
28+ - uses : actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
2929 with :
3030 python-version : " 3.10"
31- -
uses :
pre-commit/[email protected] 31+ - uses : pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
3232
3333 build_wheels :
3434 name : ${{ matrix.build || matrix.platform }} ${{ matrix.archs }} wheels
@@ -93,16 +93,18 @@ jobs:
9393 git config --global core.autocrlf false
9494 git config --global core.eol lf
9595
96- - uses : actions/checkout@v6
96+ - uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
9797 with :
9898 submodules : recursive
9999 persist-credentials : false
100100
101101 - name : Install the latest version of uv
102- uses : astral-sh/setup-uv@v7
102+ uses : astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6
103+ with :
104+ enable-cache : false
103105
104106 - name : Set up QEMU
105- 107+ uses : docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
106108 if : runner.os == 'Linux' && runner.arch == 'X64'
107109
108110 # https://github.blog/changelog/2024-04-02-github-actions-hardware-accelerated-android-virtualization-now-available/
@@ -124,21 +126,21 @@ jobs:
124126 # see https://cibuildwheel.pypa.io/en/stable/faq/#macos-building-cpython-38-wheels-on-arm64
125127 - name : " Install python 3.8 universal2 on macOS arm64"
126128 if : runner.os == 'macOS' && runner.arch == 'ARM64'
127- uses : actions/setup-python@v6
129+ uses : actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
128130 env :
129131 PIP_DISABLE_PIP_VERSION_CHECK : 1
130132 with :
131133 python-version : 3.8
132134
133135 - name : Build wheels
134- 136+ uses : pypa/cibuildwheel@63fd63b352a9a8bdcc24791c9dbee952ee9a8abc # v3.3.0
135137 env :
136138 CIBW_ARCHS : " ${{ matrix.archs }}"
137139 CIBW_BUILD : " ${{ matrix.build && '*-' || ''}}${{ matrix.build }}*"
138140 CIBW_ENABLE : " ${{ startsWith(github.ref, 'refs/tags/v') && '' || 'cpython-prerelease'}}"
139141 CIBW_PLATFORM : " ${{ matrix.platform }}"
140142
141- - uses : actions/upload-artifact@v6
143+ - uses : actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
142144 with :
143145 name : " ${{ (matrix.platform != 'pyodide') && 'pypi' || 'cibw' }}-wheels ${{ matrix.build || matrix.platform }} ${{ matrix.archs }}"
144146 path : ./wheelhouse/*.whl
@@ -152,18 +154,20 @@ jobs:
152154 env :
153155 CIBUILDWHEEL : 1 # make C extension mandatory
154156 steps :
155- - uses : actions/checkout@v6
157+ - uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
156158 with :
157159 submodules : recursive
158160 persist-credentials : false
159161
160162 - name : Install the latest version of uv
161- uses : astral-sh/setup-uv@v7
163+ uses : astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6
164+ with :
165+ enable-cache : false
162166
163167 - name : Build sdist
164168 run : uvx --from build pyproject-build --installer uv --sdist
165169
166- - uses : actions/setup-python@v6
170+ - uses : actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
167171 name : Install Python
168172 with :
169173 python-version : " 3.11"
@@ -177,19 +181,24 @@ jobs:
177181 python -m pip install --group test
178182 pytest
179183
180- - uses : actions/upload-artifact@v6
184+ - uses : actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
181185 with :
182186 name : pypi-sdist
183187 path : dist/*.tar.gz
184188
185189 check_dist :
190+ if : always()
186191 name : Check dist
187192 needs : [build_wheels, build_sdist]
188193 permissions :
189194 contents : read
190195 runs-on : ubuntu-24.04
191196 steps :
192- - uses : actions/download-artifact@v7
197+ - name : Decide whether the needed jobs succeeded or failed
198+ uses : re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
199+ with :
200+ jobs : ${{ toJSON(needs) }}
201+ - uses : actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
193202 with :
194203 # unpacks all PyPI artifacts into dist/
195204 pattern : pypi-*
@@ -201,7 +210,7 @@ jobs:
201210 EXPECTED_WHEEL_COUNT=${{ startsWith(github.ref, 'refs/tags/v') && '214' || '214' }}
202211 test ${WHEEL_COUNT} -eq ${EXPECTED_WHEEL_COUNT}
203212 pipx run twine check --strict dist/*
204- - uses : actions/download-artifact@v7
213+ - uses : actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
205214 with :
206215 # unpacks all non PyPI artifacts into nodist/
207216 pattern : cibw-*
@@ -225,14 +234,14 @@ jobs:
225234 permissions :
226235 id-token : write # trusted publishing + attestations
227236 steps :
228- - uses : actions/download-artifact@v7
237+ - uses : actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
229238 with :
230239 # unpacks all PyPI artifacts into dist/
231240 pattern : pypi-*
232241 path : dist
233242 merge-multiple : true
234243 - name : Upload to Test PyPI
235- 244+ uses : pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
236245 with :
237246 skip-existing : true
238247 repository-url : https://test.pypi.org/legacy/
@@ -248,13 +257,13 @@ jobs:
248257 permissions :
249258 id-token : write # trusted publishing + attestations
250259 steps :
251- - uses : actions/download-artifact@v7
260+ - uses : actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
252261 with :
253262 # unpacks all PyPI artifacts into dist/
254263 pattern : pypi-*
255264 path : dist
256265 merge-multiple : true
257266 - name : Upload to PyPI
258- 267+ uses : pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
259268 with :
260269 skip-existing : true
0 commit comments