@@ -469,6 +469,14 @@ jobs:
469469 # errors due to race conditions with parallel branch runs should not fail the job
470470 extra/ci_calc_size_reports.py ${GITHUB_BASE_SHA} sketches-reports/ || true
471471
472+ # upload build metadata artifact, for upload to ci-builds
473+ - name : Archive build metadata information
474+ uses : actions/upload-artifact@v7
475+ with :
476+ name : build-metadata
477+ path : ${{ env.CORE_VER }}.json
478+ retention-days : 1
479+
472480 # upload comment request artifact (will be retrieved by leave_pr_comment.yml)
473481 - name : Archive comment information
474482 uses : actions/upload-artifact@v7
@@ -600,22 +608,45 @@ jobs:
600608
601609 - uses : actions/download-artifact@v8
602610 with :
611+ pattern : ArduinoCore-*.tar.bz2
603612 path : .
604- pattern : ArduinoCore-*
605613 merge-multiple : true
606614
615+ - uses : actions/download-artifact@v8
616+ with :
617+ name : build-metadata
618+ path : snippets/metadata/
619+
607620 - name : Prepare package index snippets
608621 run : |
622+ mkdir -p snippets/platforms/
609623 jq -cr '.[]' <<< ${ARTIFACTS} | while read -r artifact; do
610624 # note: the archive names are always hash-based so they use a
611625 # predictable pattern. JSON files can use the tag for user-friendliness.
612626 ARTIFACT_FILE=ArduinoCore-${artifact}-${CORE_HASH}.tar.bz2
613- PACKAGE_JSON=ArduinoCore-${artifact}-${CORE_TAG}.json
627+ PACKAGE_JSON=snippets/platforms/ ArduinoCore-${artifact}-${CORE_TAG}.json
614628 ./extra/gen_package_index_json.sh ${artifact} ${ARTIFACT_FILE} ${PACKAGE_JSON}
615629 done
616630
617631 - name : Archive package index snippets
618632 uses : actions/upload-artifact@v7
619633 with :
620- name : ArduinoCore-zephyr-${{ env.CORE_TAG }}-jsons
621- path : ArduinoCore-*-${{ env.CORE_TAG }}.json
634+ name : snippets-${{ env.CORE_TAG }}
635+ path : snippets/
636+
637+ ci-builds-upload :
638+ name : Upload to ci-builds
639+ if : ${{ github.event_name == 'push' && github.repository == 'arduino/ArduinoCore-zephyr' }}
640+ needs :
641+ - build-env
642+ - verify-core
643+ - prepare-json
644+ permissions :
645+ id-token : write # required to obtain the OIDC token
646+ uses : ./.github/workflows/ci_builds_upload.yml
647+ with :
648+ artifact : snippets-${{ needs.build-env.outputs.CORE_TAG }}
649+ version : ${{ needs.build-env.outputs.CORE_VER }}
650+ base-branch : ${{ needs.build-env.outputs.CORE_BRANCH }}
651+ secrets :
652+ ci-builds-token : ${{ secrets.CI_BUILDS_TOKEN }}
0 commit comments