@@ -269,6 +269,8 @@ jobs:
269269 id-token : write
270270 needs :
271271 - build
272+ outputs :
273+ version : ${{ steps.get_version.outputs.VERSION }}
272274 steps :
273275 - uses : actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
274276 with :
@@ -334,3 +336,56 @@ jobs:
334336 npm publish --workspace=@utoo/pack-cli --access public --tag "${TAG}"
335337 env :
336338 VERSION : ${{ steps.get_version.outputs.VERSION }}
339+
340+ ecosystem :
341+ name : Ecosystem CI
342+ needs :
343+ - publish
344+ permissions :
345+ contents : read
346+ uses : utooland/utoo-ecosystem-ci/.github/workflows/ecosystem-ci.yml@main
347+ with :
348+ candidate_mode : npm
349+ pack_spec : ${{ needs.publish.outputs.version }}
350+ suite : all
351+ harness_repository : utooland/utoo-ecosystem-ci
352+ harness_ref : main
353+
354+ notify_ecosystem_failure :
355+ name : Notify ecosystem failure
356+ if : >-
357+ always() &&
358+ needs.publish.result == 'success' &&
359+ needs.ecosystem.result == 'failure'
360+ needs :
361+ - publish
362+ - ecosystem
363+ runs-on : ubuntu-latest
364+ permissions :
365+ issues : write
366+ steps :
367+ - name : Create failure issue
368+ shell : bash
369+ env :
370+ GH_TOKEN : ${{ github.token }}
371+ VERSION : ${{ needs.publish.outputs.version }}
372+ RUN_URL : ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
373+ TAG_URL : ${{ github.server_url }}/${{ github.repository }}/tree/${{ github.ref_name }}
374+ run : |
375+ set -euo pipefail
376+
377+ title="ci(pack): ecosystem CI failed for @utoo/pack@${VERSION}"
378+ body_path="${RUNNER_TEMP}/ecosystem-failure.md"
379+ printf '%s\n' \
380+ "The post-publish ecosystem CI failed for @utoo/pack@${VERSION}." \
381+ "" \
382+ "- Release tag: [${GITHUB_REF_NAME}](${TAG_URL})" \
383+ "- Workflow run: [${GITHUB_RUN_ID}](${RUN_URL})" \
384+ "" \
385+ "This issue was created automatically after consumer validation failed." \
386+ > "${body_path}"
387+
388+ gh issue create \
389+ --repo "${GITHUB_REPOSITORY}" \
390+ --title "${title}" \
391+ --body-file "${body_path}"
0 commit comments