Files

You can define a set of additional files that should be uploaded as part of the release. These files may also be checksumed and signed before uploading.

Configuration

Legend:

  • required

  • optional

  • may use environment variable

  • accepts Name Templates

  • YAML

  • TOML

  • JSON

  • Maven

  • Gradle

# 
files:
  # Enables or disables this section.
  # Supported values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
  # Defaults to `ALWAYS`.
  #  
  active: ALWAYS

  # Defines a list of artifacts.
  # Each entry must define a path: field.
  # The path may be relative to the project's basedir or absolute.
  #  
  artifacts:
    - path: path/to/some/file.txt
    - path: path/to/another/file.md

  # Defines a list of globs.
  # 
  globs:
      # The pattern to use.
      # May use glob or regex pattern syntax.
      #  
    - pattern: path/to/**/*.md

      # Additional properties used when evaluating templates.
      # 
      extraProperties:
        # Key will be capitalized and prefixed with `artifact`, i.e, `artifactFoo`.
        foo: bar
# 
[files]
  # Enables or disables this section.
  # Supported values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
  # Defaults to `ALWAYS`.
  #  
  active = "ALWAYS"

  # Defines a list of artifacts.
  # Each entry must define a path: field.
  # The path may be relative to the project's basedir or absolute.
  #  
  artifacts = [
    { path = "path/to/some/file.txt" },
    { path = "path/to/another/file.md" }
  ]

  # Defines a list of globs.
  # 
  [[files.globs]]
    # The pattern to use.
    # May use glob or regex pattern syntax.
    #  
    pattern = "path/to/**/*.md"

    # Additional properties used when evaluating templates.
    # 
    extraProperties.foo = "bar"
    # Key will be capitalized and prefixed with `artifact`, i.e, `artifactFoo`.
{
  // 
  "files": {
    // Enables or disables this section.
    // Supported values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
    // Defaults to `ALWAYS`.
    //  
    "active": "ALWAYS",

     // Defines a list of files.
     // Each entry must define a path: field.
     // The path may be relative to the project's basedir or absolute.
     //  
    "artifacts": [
      {
        "path": "path/to/some/file.txt"
      },
      {
        "path": "path/to/another/file.md"
      }
    ],

    // Defines a list of globs.
    // 
    "globs": [
      {
        // The pattern to use.
        // May use glob or regex pattern syntax.
        //  
        "pattern": "path/to/**/*.md",

        // Additional properties used when evaluating templates.
        // 
        "extraProperties":
        {
          // Key will be capitalized and prefixed with `artifact`, i.e, `artifactFoo`.
          "foo": "bar"
        }
      }
    ]
  }
}
<jreleaser>
  <!--
    
  -->
  <files>

    <!--
      Enables or disables this section.
      Supported values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
      Defaults to `ALWAYS`.
       
    -->
    <active>ALWAYS</active>

    <!--
      Defines a list of files.
      Each entry must define a path: field.
      The path may be relative to the project's basedir or absolute.
       
    -->
    <artifacts>
      <artifact>
        <path>path/to/some/file.txt</path>
      </artifact>
      </artifact>
        <path>path/to/another/file.md</path>
      </artifact>
    </artifacts>

    <!--
      Defines a list of globs.
      
    -->
    <globs>
      <glob>
        <!--
          The pattern to use.
          May use glob or regex pattern syntax.
           
        -->
        <pattern>path/to/**/*.md</pattern>

        <!--
          Additional properties used when evaluating templates.
           
        -->
        <extraProperties>
          <!--
            Key will be capitalized and prefixed with `artifact`, i.e, `artifactFoo`.
          -->
          <foo>bar</foo>
        </extraProperties>
      </glob>
    </globs>
  </files>
</jreleaser>
jreleaser {
  // 
  files {
    // Enables or disables this section.
    // Supported values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
    // Defaults to `ALWAYS`.
    //  
    active = 'ALWAYS'

    // Defines a file entry
    // The path may be relative to the project's basedir or absolute.
    //  
    artifact {
      path = 'path/to/some/file.txt'
    }
    artifact {
      path = 'path/to/another/file.md'
    }

    // Defines a glob entry
    // 
    glob {
      // The pattern to use.
      // May use glob or regex pattern syntax.
      //  
      template = 'path/to/**/*.md'

      // Additional properties used when evaluating templates.
      // Key will be capitalized and prefixed with `artifact`, i.e, `artifactFoo`.
      // 
      extraProperties.put('foo', 'bar')
    }
  }
}

Environment

When not explicitly set, the value of the following properties may be resolved from an environment variable or a system property as shown in the table. The system property takes precedence over the environment variable.

System Property Environment Variable

active

jreleaser.files.active

JRELEASER_FILES_ACTIVE