Version: Unity 6.7 Alpha (6000.7)
Language : English
Sign packages with the Package Manager window
Sign a Git-based package using Editor command-line arguments

Pack and sign a package using Editor command-line arguments

Pack and sign your Unity Package Manager (UPM) package so it’s ready for distribution and compatible with Unity’s package signature ecosystem.

If you publish packages using continuous integration (CI), you can create a signed package using the Unity Editor command-line interface (CLI). For other methods, refer to Methods for signing packages.

To gather your organization’s Organization ID and sign your package from the command line:

  1. If the project that uses the package you want to sign is open, close the Unity Editor.

  2. Go to the Unity Cloud Dashboard and select the organization you want to use for signing. For information about selecting or switching organizations, refer to Switch organization.

    Note: For large projects whose contributors span multiple organizations, be sure to select the wider organization (or company-wide organization). If that organization doesn’t exist yet, refer to Considerations for companies with multiple organizations.

  3. Copy the Organization ID value. Refer to Identify the organization ID.

  4. Open a terminal or command-line window.

  5. Change directories to the location of your Unity Editor. For information about using Unity Hub to locate your Editor location, refer to Installs.

  6. Input the following command, replacing the placeholder values represented by angled brackets:

Windows

Unity.exe -batchmode -username <email_address> -password <your_password> \
    -upmPack <path_to_package_folder> <path_to_tarball> \
    -cloudOrganization <your_organization_id>

macOS

Unity.app/Contents/MacOS/Unity -batchmode -username <email_address> -password <your_password> \
    -upmPack <path_to_package_folder> <path_to_tarball> \
    -cloudOrganization <your_organization_id>
Parameter to replace Description
<email_address> The email address you use to sign in to Unity products and services.
<your_password> The password you use to sign in to Unity products and services.
<path_to_package_folder> The fully qualified path to the folder that contains the package.json file for the package you want to sign.
Note: Don’t include package.json in this parameter value.
<path_to_tarball> The output path where you want to save the signed tarball file (.tgz).
Note: If the folder doesn’t exist, the command creates it for you.
<your_organization_id> The Organization ID you copied from the Unity Cloud Dashboard.

The output tarball file contains an encrypted file (.attestation.p7m), which contains the package signature.

Refer to Share your package for information about distributing this tarball file to others.

Additional resources

Sign packages with the Package Manager window
Sign a Git-based package using Editor command-line arguments