environment:
  properties:
    jdkPathPrefix: 'apps/jreleaser/build/jdks'
    jdkFilePrefix: 'zulu11.48.21-ca-jdk11.0.11'

project:
  name: jreleaser
  description: Release Java projects quickly and easily with JReleaser
  longDescription: |
    JReleaser is a release automation tool for Java projects. Its goal is to simplify creating releases
    and publishing artifacts to multiple package managers while providing customizable options.

    JReleaser takes inputs from popular builds tools (Ant, Maven, Gradle) such as JAR files, binary
    distributions (.zip, .tar), JLink images, or any other file that you’d like to publish as a Git
    release on popular Git services such as Github or Gitlab. Distribution files can additionally be
    published to be consumed by popular package managers as Homebrew, Snapcraft, or get ready to be
    launched via JBang. Releases may be announced in a variety of channels such as Twitter, Zulip, or SDKMAN!

  website: https://jreleaser.org
  authors:
    - Andres Almiray
  license: Apache-2.0
  java:
    groupId: org.jreleaser
    version: 8
    multiProject: true
  extraProperties:
    inceptionYear: 2020

release:
  github:
    overwrite: true
    sign: true
    discussionCategoryName: Announcements
    changelog:
      formatted: ALWAYS
      format: '- {{commitShortHash}} {{commitTitle}}'
      contributors:
        format: '- {{contributorName}}{{#contributorUsernameAsLink}} ({{.}}){{/contributorUsernameAsLink}}'
      labelers:
        - label: 'merge_pull'
          title: 'Merge pull'
        - label: 'merge_branch'
          title: 'Merge branch'
        - label: 'feature'
          title: 'Resolves #'
          body: 'Resolves #'
        - label: 'issue'
          title: 'Fixes #'
          body: 'Fixes #'
        - label: 'issue'
          title: 'Relates to #'
          body: 'Relates to #'
        - label: 'task'
          title: '[chore]'
        - label: 'dependencies'
          title: '[deps]'
      categories:
        - title: 'Merge'
          labels:
            - 'merge_pull'
            - 'merge_branch'
        - title: '🚀 Features'
          labels:
            - 'feature'
        - title: '✅ Issues'
          labels:
            - 'issue'
        - title: '🧰 Tasks'
          labels:
            - 'task'
        - title: '⚙️  Dependencies'
          labels:
            - 'dependencies'
      hide:
        categories:
          - 'Merge'
        contributors:
          - 'GitHub'
      replacers:
        - search: '\[chore\] '
        - search: '\[deps\] '

signing:
  active: always
  armored: true
  files: false

checksum:
  files: false

announce:
  twitter:
    active: release
    status: 🚀 JReleaser {{projectVersion}} has been released! {{releaseNotesUrl}}

assemble:
  jlink:
    jreleaser-standalone:
      active: always
      java:
        version: 11
        mainClass: 'org.jreleaser.cli.Main'
      imageName: '{{distributionName}}-{{projectEffectiveVersion}}'
      #imageName: '{{distributionName}}-{{projectVersion}}'
      #imageNameTransform: '{{distributionName}}-{{projectEffectiveVersion}}'
      executable: 'jreleaser'
      moduleNames:
        - java.base
        - java.desktop
        - java.management
        - java.naming
        - java.rmi
        - java.security.jgss
        - java.security.sasl
        - java.sql
        - jdk.crypto.ec
        - jdk.crypto.cryptoki
        - jdk.security.auth
        - jdk.security.jgss
        - org.openjsse
      targetJdks:
        - path: '{{jdkPathPrefix}}/zulu11Osx/{{jdkFilePrefix}}-macosx_x64/zulu-11.jdk/Contents/Home'
          platform: 'osx-x86_64'
        - path: '{{jdkPathPrefix}}/zulu11Linux/{{jdkFilePrefix}}-linux_x64'
          platform: 'linux-x86_64'
        - path: '{{jdkPathPrefix}}/zulu11LinuxMusl/{{jdkFilePrefix}}-linux_musl_x64'
          platform: 'linux_musl-x86_64'
        - path: '{{jdkPathPrefix}}/zulu11Windows/{{jdkFilePrefix}}-win_x64'
          platform: 'windows-x86_64'
      mainJar:
        path: 'apps/jreleaser/build/libs/jreleaser-{{projectVersion}}.jar'
      jars:
        - pattern: 'apps/jreleaser/build/dependencies/flat/*.jar'

distributions:
  jreleaser:
    java:
      mainClass: org.jreleaser.cli.Main
    brew:
      active: release
    scoop:
      active: release
    snap:
      active: release
      remoteBuild: true
      base: core18
      localPlugs:
        - network
        - home
    jbang:
      active: always
    sdkman:
      active: release
    artifacts:
      - path: apps/{{distributionName}}/build/distributions/{{distributionName}}-{{projectVersion}}.zip
        transform: '{{distributionName}}/{{distributionName}}-{{projectEffectiveVersion}}.zip'
      - path: apps/{{distributionName}}/build/distributions/{{distributionName}}-{{projectVersion}}.tar
        transform: '{{distributionName}}/{{distributionName}}-{{projectEffectiveVersion}}.tar'

  jreleaser-ant-tasks:
    artifacts:
      - path: plugins/{{distributionName}}/build/distributions/{{distributionName}}-{{projectVersion}}.zip
        transform: '{{distributionName}}/{{distributionName}}-{{projectEffectiveVersion}}.zip'

  jreleaser-tool-provider:
    type: SINGLE_JAR
    artifacts:
      - path: apps/{{distributionName}}/build/libs/{{distributionName}}-{{projectVersion}}.jar
        transform: '{{distributionName}}/{{distributionName}}-{{projectEffectiveVersion}}.jar'

  jreleaser-standalone:
    docker:
      active: always
      registries:
        - serverName: DEFAULT
          username: jreleaser
      labels:
        'org.opencontainers.image.title': 'jreleaser'
      postCommands:
        - 'VOLUME /workspace'
      specs:
        slim:
          imageNames:
            - 'jreleaser/jreleaser-{{dockerSpecName}}:{{tagName}}'
            - 'jreleaser/jreleaser-{{dockerSpecName}}:latest'
          matchers:
            platform: 'linux-x86_64'
          preCommands:
            - 'RUN apt-get update -y'
            - 'RUN apt-get install unzip'
        alpine:
          imageNames:
            - 'jreleaser/jreleaser-{{dockerSpecName}}:{{tagName}}'
            - 'jreleaser/jreleaser-{{dockerSpecName}}:latest'
          matchers:
            platform: 'linux_musl-x86_64'
          preCommands:
            - 'RUN apk add unzip'

files:
  artifacts:
    - path: VERSION
