GitLab CI

You can setup a GitLab CI job as well.

If you’re already building with either Maven or Gradle then you might use the JReleaser Maven Plugin or the JReleaser Gradle Plugin instead.
.gitlab-ci.yml
# Define a build step
build:
  # Specify an image that contains Java
  # Alternatively you may use a maven image if
  # your project does not rely on the Maven wrapper
  image: azul/zulu-openjdk:11
  # Bind to `build` stage
  stage: build
  # Full build
  script:
    - ./mvnw --batch-mode verify
  # Save artifacts for release
  artifacts:
    paths:
      - target/distributions/app/*.zip

# Create a release
release:
  # Use the predefined JReleaser Docker image
  image: jreleaser/jreleaser-slim:<version>
  # Bind to `deploy` stage
  stage: deploy
  # Set environment variables accordingly
  variables:
    JRELEASER_PROJECT_VERSION: 1.0.0
    JRELEASER_GPG_PASSPHRASE: $GPG_PASSPHRASE
    JRELEASER_GPG_PUBLIC_KEY: $GPG_PUBLIC_KEY
    JRELEASER_GPG_SECRET_KEY: $GPG_SECRET_KEY
    JRELEASER_GITLAB_TOKEN: $GL_PAT
    # Disable shallow cloning so that JReleaser can diff between tags
    # to generate a changelog
    GIT_DEPTH: 0
  #  Execute JReleaser
  script:
    - jreleaser full-release
You may use latest to pull the latest stable release or early-access to pull the latest snapshot.

There is more than one jreleaser image available. Available images are listed here.