2828 runs-on : ' ubuntu-24.04'
2929 permissions :
3030 contents : read
31+ timeout-minutes : 1
3132 outputs :
3233 tag : " ${{ steps.tag-validate.outputs.tag }}"
3334 steps :
5253 dynamic_version : ${{ steps.dynamic-version.outputs.dynamic_version }}
5354 permissions :
5455 contents : read
56+ timeout-minutes : 1
5557 steps :
5658 # Harden the runner used by this workflow
5759 - uses : step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
8183 contents : write
8284 id-token : write # Needed for attestations
8385 attestations : write # Needed for attestations
86+ timeout-minutes : 12
8487 env :
8588 GH_TOKEN : " ${{ secrets.GITHUB_TOKEN }}"
8689 steps :
@@ -117,6 +120,7 @@ jobs:
117120 matrix : " ${{ fromJson(needs.python-build.outputs.matrix_json) }}"
118121 permissions :
119122 contents : read
123+ timeout-minutes : 12
120124 steps :
121125 # Harden the runner used by this workflow
122126 - uses : step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
@@ -127,7 +131,9 @@ jobs:
127131
128132 - name : ' Test Python project [PYTEST]'
129133 # yamllint disable-line rule:line-length
130- uses : lfreleng-actions/python-test-action@b06828bf94ae4beef00d49cddc06839eca2d8f05 # v0.1.6
134+ uses : modeseven-lfreleng-actions/python-test-action@update-action # Testing
135+ # yamllint disable-line rule:line-length
136+ # uses: lfreleng-actions/python-test-action@b06828bf94ae4beef00d49cddc06839eca2d8f05 # v0.1.6
131137 with :
132138 python_version : " ${{ matrix.python-version }}"
133139
@@ -142,6 +148,7 @@ jobs:
142148 matrix : " ${{ fromJson(needs.python-build.outputs.matrix_json) }}"
143149 permissions :
144150 contents : read
151+ timeout-minutes : 10
145152 steps :
146153 # Harden the runner used by this workflow
147154 - uses : step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
@@ -169,6 +176,7 @@ jobs:
169176 matrix : " ${{ fromJson(needs.python-build.outputs.matrix_json) }}"
170177 permissions :
171178 contents : read
179+ timeout-minutes : 10
172180 steps :
173181 # Harden the runner used by this workflow
174182 - uses : step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
@@ -196,6 +204,7 @@ jobs:
196204 permissions :
197205 contents : read
198206 id-token : write # IMPORTANT: this permission is mandatory for trusted publishing
207+ timeout-minutes : 5
199208 steps :
200209 # Harden the runner used by this workflow
201210 - uses : step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
@@ -222,6 +231,7 @@ jobs:
222231 permissions :
223232 contents : read
224233 id-token : write # IMPORTANT: this permission is mandatory for trusted publishing
234+ timeout-minutes : 5
225235 steps :
226236 # Harden the runner used by this workflow
227237 - uses : step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
@@ -241,14 +251,17 @@ jobs:
241251 promote-release :
242252 name : ' Promote Draft Release'
243253 # yamllint disable-line rule:line-length
244- if : startsWith(github.ref, 'refs/tags/') || contains(github.event.head_commit.message, '[release]')
254+ if : startsWith(github.ref, 'refs/tags/')
245255 needs :
246256 - tag-validate
247257 - pypi
248258 runs-on : ' ubuntu-24.04'
249259 permissions :
250260 contents : write
251261 # id-token: write
262+ timeout-minutes : 2
263+ outputs :
264+ release_url : " ${{ steps.promote-release.outputs.release_url }}"
252265 steps :
253266 # Harden the runner used by this workflow
254267 # yamllint disable-line rule:line-length
@@ -260,9 +273,43 @@ jobs:
260273 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
261274
262275 - name : ' Promote draft release'
276+ id : promote-release
277+ # yamllint disable-line rule:line-length
278+ uses : modeseven-lfreleng-actions/draft-release-promote-action@output-release-url # Testing
263279 # yamllint disable-line rule:line-length
264- uses : lfreleng-actions/draft-release-promote-action@0392844e1e08a0539b63ba1940a7a2bfa2bda077 # v0.1.1
280+ # uses: lfreleng-actions/draft-release-promote-action@0392844e1e08a0539b63ba1940a7a2bfa2bda077 # v0.1.1
265281 with :
266282 token : " ${{ secrets.GITHUB_TOKEN }}"
267283 tag : " ${{ needs.tag-validate.outputs.tag }}"
268284 latest : true
285+
286+ # Need to attach build artefacts to the release
287+ # This step could potentially be moved
288+ # (May be better to when/where the release is still in draft state)
289+ attach-artefacts :
290+ name : ' Attach Artefacts to Release'
291+ runs-on : ' ubuntu-24.04'
292+ needs :
293+ - tag-validate
294+ - python-build
295+ - promote-release
296+ permissions :
297+ contents : write
298+ timeout-minutes : 5
299+ steps :
300+ # Harden the runner used by this workflow
301+ - uses : step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
302+ with :
303+ egress-policy : audit
304+
305+ # Note: should not need a checkout step
306+
307+ - name : ' Attach artefacts to release'
308+ # yamllint disable-line rule:line-length
309+ uses : modeseven-lfreleng-actions/release-attach-artefacts-action@initial-update # Testing
310+ with :
311+ # Probably only need one of these in the implementation; decide later
312+ tag : " ${{ needs.tag-validate.outputs.tag }}"
313+ release_url : " ${{ needs.promote-release.outputs.release_url }}"
314+ artefact_name : " ${{ needs.python-build.outputs.artefact_name }}"
315+ artefact_path : " ${{ needs.python-build.outputs.artefact_path }}"
0 commit comments