@@ -143,19 +143,6 @@ jobs:
143143 repository : ${{ github.repository }}
144144 name : ${{ needs.build.outputs.artifact_name }}
145145
146- - name : Append attestation references to RC notes
147- run : |
148- {
149- echo ""
150- echo "## Build Metadata"
151- if [ -n "${{ needs.build.outputs.binary_attestation_url }}" ]; then
152- echo "- Attestation created (binaries): ${{ needs.build.outputs.binary_attestation_url }}"
153- fi
154- if [ -n "${{ needs.build.outputs.oci_attestation_url }}" ]; then
155- echo "- Attestation created (oci): ${{ needs.build.outputs.oci_attestation_url }}"
156- fi
157- } >> "${{ runner.temp }}/CHANGELOG.md"
158-
159146 - name : Create RC Release
160147 uses : softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2
161148 with :
@@ -197,49 +184,6 @@ jobs:
197184 return;
198185 }
199186
200- # ----------------------------------------------------------------
201- # 5b. Resolve RC metadata used for final summaries
202- # ----------------------------------------------------------------
203- resolve_rc_metadata :
204- name : Resolve RC Metadata for Final Summaries
205- if : ${{ github.event.inputs.release_candidate == 'false' }}
206- needs : [prepare, validate_final]
207- runs-on : ubuntu-latest
208- outputs :
209- rc_binary_attestation_url : ${{ steps.resolve.outputs.rc_binary_attestation_url }}
210- rc_oci_attestation_url : ${{ steps.resolve.outputs.rc_oci_attestation_url }}
211- steps :
212- - name : Resolve attestation links from RC release body
213- id : resolve
214- uses : actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
215- env :
216- RC_TAG : ${{ needs.prepare.outputs.latest_rc_tag }}
217- with :
218- github-token : ${{ secrets.GITHUB_TOKEN }}
219- script : |
220- const tag = process.env.RC_TAG;
221- if (!tag) {
222- core.setFailed('Missing RC_TAG');
223- return;
224- }
225-
226- const release = await github.rest.repos.getReleaseByTag({
227- owner: context.repo.owner,
228- repo: context.repo.repo,
229- tag,
230- });
231-
232- const body = release.data.body || '';
233- const binary = body.match(/Attestation created \(binaries\):\s*(https:\/\/github\.com\/[^\s]+)/i);
234- const oci = body.match(/Attestation created \(oci\):\s*(https:\/\/github\.com\/[^\s]+)/i);
235-
236- core.setOutput('rc_binary_attestation_url', binary ? binary[1] : '');
237- core.setOutput('rc_oci_attestation_url', oci ? oci[1] : '');
238-
239- if (!binary && !oci) {
240- core.warning(`No dedicated attestation links found in RC release body for tag ${tag}`);
241- }
242-
243187 # --------------------------------------------------------
244188 # 6. Tag Final: Create and push final tag from RC commit
245189 # --------------------------------------------------------
@@ -320,7 +264,7 @@ jobs:
320264 promote_image :
321265 name : Promote OCI Image to Final and Latest
322266 if : ${{ github.event.inputs.release_candidate == 'false' && github.event.inputs.dry_run == 'false' }}
323- needs : [prepare, validate_final, resolve_rc_metadata, tag_final]
267+ needs : [prepare, validate_final, tag_final]
324268 runs-on : ubuntu-latest
325269 permissions :
326270 packages : write
@@ -342,14 +286,12 @@ jobs:
342286 RC_VERSION : ${{ needs.prepare.outputs.latest_rc_version }}
343287 FINAL_VERSION : ${{ needs.prepare.outputs.latest_promotion_version }}
344288 TARGET_REPO : ${{ env.REGISTRY }}/${{ github.repository_owner }}/cli
345- RC_OCI_ATTESTATION_URL : ${{ needs.resolve_rc_metadata.outputs.rc_oci_attestation_url }}
346289 with :
347290 script : |
348291 const { execSync } = require('child_process');
349292 const rcVersion = process.env.RC_VERSION;
350293 const finalVersion = process.env.FINAL_VERSION;
351294 const targetRepo = process.env.TARGET_REPO;
352- const rcOciAttestationUrl = process.env.RC_OCI_ATTESTATION_URL;
353295 if (!rcVersion) {
354296 core.setFailed('Missing RC_VERSION');
355297 return;
@@ -368,26 +310,15 @@ jobs:
368310 ['Source Tag', `${targetRepo}:${rcVersion}`],
369311 ['Promoted Tags', `${targetRepo}:${finalVersion}, ${targetRepo}:latest`],
370312 ])
371- .addHeading('Attestation');
372-
373- if (rcOciAttestationUrl) {
374- await core.summary
375- .addLink(rcOciAttestationUrl, rcOciAttestationUrl)
376- .write();
377- } else {
378- await core.summary
379- .addRaw('No dedicated RC OCI attestation URL found in RC release notes.')
380- .addEOL()
381- .write();
382- }
313+ .write();
383314
384315 # --------------------------------------------------------
385316 # 8. Release Final: Create GitHub final release from RC assets
386317 # --------------------------------------------------------
387318 release_final :
388319 name : Create Final Release from RC
389320 if : ${{ github.event.inputs.release_candidate == 'false' && github.event.inputs.dry_run == 'false' }}
390- needs : [prepare, validate_final, resolve_rc_metadata, tag_final, promote_image]
321+ needs : [prepare, validate_final, tag_final, promote_image]
391322 runs-on : ubuntu-latest
392323 permissions :
393324 contents : write
@@ -427,8 +358,6 @@ jobs:
427358 env :
428359 RC_TAG : ${{ needs.prepare.outputs.latest_rc_tag }}
429360 RC_VERSION : ${{ needs.prepare.outputs.latest_rc_version }}
430- RC_BINARY_ATTESTATION_URL : ${{ needs.resolve_rc_metadata.outputs.rc_binary_attestation_url }}
431- RC_OCI_ATTESTATION_URL : ${{ needs.resolve_rc_metadata.outputs.rc_oci_attestation_url }}
432361 FINAL_TAG : ${{ needs.prepare.outputs.latest_promotion_tag }}
433362 FINAL_VERSION : ${{ needs.prepare.outputs.latest_promotion_version }}
434363 TARGET_REPO : ${{ env.REGISTRY }}/${{ github.repository_owner }}/cli
@@ -444,8 +373,6 @@ jobs:
444373 const finalVersion = process.env.FINAL_VERSION;
445374 const rcTag = process.env.RC_TAG;
446375 const rcVersion = process.env.RC_VERSION;
447- const rcBinaryAttestationUrl = process.env.RC_BINARY_ATTESTATION_URL;
448- const rcOciAttestationUrl = process.env.RC_OCI_ATTESTATION_URL;
449376 const targetRepo = process.env.TARGET_REPO;
450377 const downloadDir = process.env.DOWNLOAD_DIR;
451378 const notesFile = process.env.NOTES_FILE;
@@ -498,27 +425,4 @@ jobs:
498425 ['OCI Tags', `${targetRepo}:${finalVersion}, ${targetRepo}:latest (from ${rcVersion || 'n/a'})`],
499426 ['Uploaded Assets', String(files.length)],
500427 ])
501- .addHeading('Attestation');
502-
503- if (rcOciAttestationUrl) {
504- await core.summary
505- .addRaw('OCI: ')
506- .addLink(rcOciAttestationUrl, rcOciAttestationUrl)
507- .addEOL()
508- .write();
509- }
510-
511- if (rcBinaryAttestationUrl) {
512- await core.summary
513- .addRaw('Binaries: ')
514- .addLink(rcBinaryAttestationUrl, rcBinaryAttestationUrl)
515- .addEOL()
516- .write();
517- }
518-
519- if (!rcOciAttestationUrl && !rcBinaryAttestationUrl) {
520- await core.summary
521- .addRaw('No dedicated RC attestation URL found in RC release notes.')
522- .addEOL()
523- .write();
524- }
428+ .write();
0 commit comments