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.

Legend:

  • required

  • optional

  • may use environment variable

  • accepts Name Templates

  • YAML

  • TOML

  • JSON

  • Maven

  • Gradle

# 
files:

  # 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]

  # 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": {

     // 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>

    <!--
      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 {
    // 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')
    }
  }
}