@@ -427,6 +427,7 @@ jobs:
427427 - name : Validate release publish approval run
428428 env :
429429 ALLOW_COMPLETED_SUCCESSFUL_PARENT : " true"
430+ DRY_RUN : ${{ inputs.dry_run && 'true' || 'false' }}
430431 GH_TOKEN : ${{ github.token }}
431432 RELEASE_PUBLISH_RUN_ID : ${{ inputs.release_publish_run_id }}
432433 EXPECTED_RUN_ATTEMPT : ${{ inputs.release_publish_run_attempt }}
@@ -436,12 +437,12 @@ jobs:
436437 run : |
437438 set -euo pipefail
438439 if [[ -z "${RELEASE_PUBLISH_RUN_ID// }" ]]; then
439- if [[ "${GITHUB_ACTOR }" == "github-actions[bot] " ]]; then
440- echo "Plugin ClawHub publish dispatched by another workflow must include release_publish_run_id." >&2
441- exit 1
440+ if [[ "${DRY_RUN }" == "true " ]]; then
441+ echo "Validation-only ClawHub package preparation; no publication authority requested."
442+ exit 0
442443 fi
443- echo "Direct Plugin ClawHub Release dispatch; relying on this workflow's clawhub-plugin- release environment approval."
444- exit 0
444+ echo "ClawHub OIDC publication requires a release parent with an exact transaction authorization receipt. Use the release parent workflow, or the separately authenticated manual ClawHub owner route." >&2
445+ exit 1
445446 fi
446447 direct_recovery=false
447448 if [[ "${GITHUB_ACTOR}" != "github-actions[bot]" ]]; then
@@ -534,9 +535,59 @@ jobs:
534535 if-no-files-found : error
535536 retention-days : 7
536537
537- approve_plugins_clawhub_release :
538+ seal_clawhub_transactions :
539+ name : Seal ClawHub package transactions
538540 needs : [preview_plugins_clawhub, pack_plugins_clawhub_artifacts]
539- if : always() && github.event_name == 'workflow_dispatch' && inputs.dry_run != true && needs.preview_plugins_clawhub.outputs.has_candidates == 'true' && needs.pack_plugins_clawhub_artifacts.result == 'success'
541+ if : github.event_name == 'workflow_dispatch' && inputs.dry_run != true && needs.preview_plugins_clawhub.outputs.has_candidates == 'true'
542+ runs-on : ubuntu-latest
543+ permissions :
544+ actions : read
545+ contents : read
546+ outputs :
547+ identity : ${{ steps.seal.outputs.identity }}
548+ steps :
549+ - name : Checkout trusted transaction tooling
550+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
551+ with :
552+ persist-credentials : false
553+ ref : ${{ github.workflow_sha }}
554+ - name : Setup Node
555+ uses : actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
556+ with :
557+ node-version : ${{ env.NODE_VERSION }}
558+ - name : Download exact packed transactions
559+ uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
560+ with :
561+ pattern : clawhub-package-*
562+ path : ${{ runner.temp }}/clawhub-transactions/packages
563+ - name : Seal actual packed inventories
564+ id : seal
565+ env :
566+ TARGET_SHA : ${{ needs.preview_plugins_clawhub.outputs.ref_revision }}
567+ PACKAGE_MATRIX : ${{ needs.preview_plugins_clawhub.outputs.matrix }}
568+ RELEASE_PUBLISH_RUN_ID : ${{ inputs.release_publish_run_id }}
569+ RELEASE_PUBLISH_RUN_ATTEMPT : ${{ inputs.release_publish_run_attempt }}
570+ RELEASE_PUBLISH_BRANCH : ${{ inputs.release_publish_branch }}
571+ RELEASE_PUBLISH_FULL_REF : ${{ inputs.release_publish_full_ref }}
572+ RELEASE_PUBLISH_WORKFLOW_SHA : ${{ inputs.release_publish_workflow_sha }}
573+ run : |
574+ set -euo pipefail
575+ printf '%s' "$PACKAGE_MATRIX" > "$RUNNER_TEMP/clawhub-transactions/matrix.json"
576+ node scripts/clawhub-parent-authorization.mjs seal \
577+ --matrix "$RUNNER_TEMP/clawhub-transactions/matrix.json" \
578+ --directory "$RUNNER_TEMP/clawhub-transactions/packages" \
579+ --output "$RUNNER_TEMP/clawhub-transactions/transactions.json"
580+ - name : Upload exact transaction identity
581+ uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
582+ with :
583+ name : ${{ steps.seal.outputs.artifact_name }}
584+ path : ${{ runner.temp }}/clawhub-transactions/transactions.json
585+ if-no-files-found : error
586+ retention-days : 30
587+
588+ approve_plugins_clawhub_release :
589+ needs : [preview_plugins_clawhub, pack_plugins_clawhub_artifacts, seal_clawhub_transactions]
590+ if : always() && github.event_name == 'workflow_dispatch' && inputs.dry_run != true && needs.preview_plugins_clawhub.outputs.has_candidates == 'true' && needs.pack_plugins_clawhub_artifacts.result == 'success' && needs.seal_clawhub_transactions.result == 'success'
540591 runs-on : ubuntu-latest
541592 environment : clawhub-plugin-release
542593 permissions :
@@ -548,7 +599,12 @@ jobs:
548599
549600 publish_plugins_clawhub :
550601 needs :
551- [preview_plugins_clawhub, pack_plugins_clawhub_artifacts, approve_plugins_clawhub_release]
602+ [
603+ preview_plugins_clawhub,
604+ pack_plugins_clawhub_artifacts,
605+ seal_clawhub_transactions,
606+ approve_plugins_clawhub_release,
607+ ]
552608 if : always() && github.event_name == 'workflow_dispatch' && needs.preview_plugins_clawhub.outputs.has_candidates == 'true' && needs.pack_plugins_clawhub_artifacts.result == 'success' && (inputs.dry_run == true || needs.approve_plugins_clawhub_release.result == 'success')
553609 uses : openclaw/clawhub/.github/workflows/package-publish.yml@87ca030c30f3cfb78ab15c8e66b5ff1469c8f9c8 # v0.23.3
554610 permissions :
@@ -561,6 +617,8 @@ jobs:
561617 matrix :
562618 plugin : ${{ fromJson(needs.preview_plugins_clawhub.outputs.matrix) }}
563619 with :
620+ trusted_tooling_identity_json : ${{ needs.seal_clawhub_transactions.outputs.identity }}
621+ wait_for_publication : false
564622 package_artifact_name : ${{ matrix.plugin.artifactName }}
565623 dry_run : ${{ inputs.dry_run }}
566624 registry : https://clawhub.ai
@@ -574,52 +632,5 @@ jobs:
574632 inspector_artifact_name : ${{ matrix.plugin.artifactName }}-inspector
575633 publish_json_artifact_name : ${{ matrix.plugin.artifactName }}-publish-json
576634
577- verify_published_clawhub_package :
578- needs : [preview_plugins_clawhub, publish_plugins_clawhub]
579- if : github.event_name == 'workflow_dispatch' && inputs.dry_run != true && needs.preview_plugins_clawhub.outputs.has_candidates == 'true'
580- runs-on : ubuntu-latest
581- timeout-minutes : 45
582- permissions :
583- actions : read
584- contents : read
585- strategy :
586- fail-fast : false
587- max-parallel : 32
588- matrix :
589- plugin : ${{ fromJson(needs.preview_plugins_clawhub.outputs.matrix) }}
590- steps :
591- - name : Checkout verification tooling
592- uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
593- with :
594- persist-credentials : false
595- ref : ${{ github.sha }}
596- fetch-depth : 1
597-
598- - name : Setup Node environment
599- uses : ./.github/actions/setup-node-env
600- with :
601- cache-mode : off
602- node-version : ${{ env.NODE_VERSION }}
603- install-bun : " false"
604- install-deps : " false"
605-
606- - name : Download published package input
607- uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
608- with :
609- name : ${{ matrix.plugin.artifactName }}
610- path : ${{ runner.temp }}/clawhub-package-artifact
611-
612- - name : Verify published ClawHub package
613- env :
614- CLAWHUB_REGISTRY : ${{ env.CLAWHUB_REGISTRY }}
615- PACKAGE_NAME : ${{ matrix.plugin.packageName }}
616- PACKAGE_VERSION : ${{ matrix.plugin.version }}
617- PACKAGE_TAG : ${{ matrix.plugin.publishTag }}
618- run : |
619- set -euo pipefail
620- node scripts/verify-clawhub-published-artifact.mjs \
621- --expected-artifact-dir "${RUNNER_TEMP}/clawhub-package-artifact" \
622- --package-name "${PACKAGE_NAME}" \
623- --package-version "${PACKAGE_VERSION}" \
624- --publish-tag "${PACKAGE_TAG}" \
625- --registry "${CLAWHUB_REGISTRY}"
635+ # Exact public artifact verification runs in plugin-clawhub-postpublish.yml
636+ # after the authorizing parent succeeds. Waiting here would deadlock staging.
0 commit comments