Uploading custom artifacts

How to upload files to be included in your build artifacts ZIP file

You can use a script to upload custom artifacts, such as screenshots, to $CM_EXPORT_DIR and include them in the build artifacts ZIP file generated by Codemagic.

For example, in a codemagic.yaml script step or Flutter workflow editor post-test script, use this command to copy build screenshots to $CM_EXPORT_DIR to be exported:

  scripts:
    - name: Copy custom artifacts
      script: | 
        #!/usr/bin/env sh
        cp  -r build/screenshots $CM_EXPORT_DIR/screenshots