Help Center> CodeArts Build> User Guide> Configuring Build Actions> Graphical Build> Uploading Software Packages to Release Repos
Updated on 2023-12-21 GMT+08:00

Uploading Software Packages to Release Repos

To upload generated software packages to release repos, add Upload to Release Repos when configuring build actions.

When you choose Windows executors, add action Upload Software Package to Release Repos (Windows).

  • Only one or more files can be uploaded. Folders cannot be uploaded and directories cannot be automatically created.

    For example, the a directory contains the aa file and b directory that contains the bb file, and the build package directory is set to a/**.

    When the a directory is scanned, both aa and bb will be uploaded to the same directory, and the system will not create a b directory in release repos.

  • To upload a folder, package it before adding the Upload to Release Repos action. You can package the folder by running the packaging command or adding the Run Shell Commands action.
  • For details about the restrictions on the uploaded software packages, see Constraints of CodeArts Artifact.

The parameters are described in the following table.

Parameter

Description

Action Name

Name of a build action. It can be customized.

Package Location

Directory for storing the build result. A regular expression is supported. Example: **/target/*.?ar uploads all JAR and WAR packages built with Maven.

Version

Directory for storing the build package in a release repo. Leave this blank to use the build ID for the directory (recommended).

Package Name

New name for files uploaded to the release repo. Leave this parameter blank to use the original file names (recommended).

Parameter Settings

  • Build Package Directory

    The build package directory supports regular expression matching. ** means that the system recursively traverses the current directory. * indicates zero or multiple characters. ? indicates one character.

    The system file separator is a slash /, and the path is case-insensitive.

    Examples:

    • *.class

      Matches files whose names end with .class in the current directory.

    • **/*.class

      Recursively matches all files whose names end with .class in the current directory.

    • test/a??.java

      Matches Java files whose names start with a followed by two characters in the test directory.

    • **/test/**/XYZ*

      Recursively matches all files whose parent directory is test and whose names start with XYZ, for example, abc/test/def/ghi/XYZ123.

  • Release Version and Package Name

    Leave Package Name unspecified so that all files matching the build package directory can be uploaded.

    After the package name is set, overwriting may occur if multiple files are matched. If the package name needs to be set and multiple files need to be uploaded, add the uploading action for multiple times.

    The figure below illustrates the impact of an unspecified release version and package name on uploads.