Files
jreleaser.github.io/docs/modules/ROOT/pages/workflow.adoc

113 lines
4.5 KiB
Plaintext

= Workflow
JReleaser follows a series of steps to create and upload a release. You may invoke all steps in one go
(the preferred way) or each step individually and separate from the others. Steps are executed sequentially;
if one of them fails then the build fails. You may decide to resume from the start or from the last failed step.
Announcers are the only exception, if one of them fails then the build may continue however a warning is printed
out. You may decide to rerun all announcers or just the one that failed.
TIP: The preferred option is to invoke <<_full_release>> as it runs all steps in the expected sequence.
The following diagram shows the steps and their dependencies with one another:
image::jreleaser-workflow.png[]
The following sections describe these steps:
== Assemble
Assembles distributions such as Jlink and Native Image. Outputs will automatically configure/update matching named
distributions for xref:_prepare[], xref:_package[], and xref:_publish[].
Given the nature of platform specific distributions this step must be invoked separatedly from the others.
== Changelog
Creates the changelog, either by taking a supplemented external file or calculates it based on the last tag that matches
the configuration.
== Checksum
Calculates SHA256 checksums on all input files. This includes all artifacts per distribution and every matching
file configured in the xref:configuration:files.adoc[] section.
All files must exist by the time Checksum is invoked, otherwise an error will occur.
Checksums will be placed at `${basedir}/out/jreleaser/checksums`.
Depends on <<_changelog>>.
== Sign
Creates PGP signatures for all input files. This includes all artifacts per distribution and every matching
file configured in the xref:configuration:files.adoc[] section, plus the output file from the <<_checksum>>
step (`"checksums.txt"`). This step is optional and can be disabled if needed. Review the xref:configuration:signing.adoc[]
section found in the configuration.
Signatures will be placed at `${basedir}/out/jreleaser/signatures`.
Depends on <<_checksum>>.
== Release
Creates a release at the configured remote Git repository (see xref:configuration:release/index.adoc[]). This step uploads
all checksums, signatures (if enabled), all distribution artifacts, and every matching file configured in the
xref:configuration:files.adoc[] section. Automatically calculates a changelog & tags the release.
Depends on <<_sign>>.
== Prepare
Generates files required by xref:configuration:packagers/index.adoc[] such as xref:configuration:packagers/homebrew.adoc[].
These files will be generated from templates existing in your project at a configured location (the `templateDirectory` of
each packager) and default templates bundled in the JReleaser distribution. These template files rely on
xref:configuration:name-templates.adoc[] to parameterize their contents.
Prepared files will be placed at `${basedir}/out/jreleaser/${distributionName}/${packager}/prepared`.
Depends on <<_checksum>>.
== Package
Processes the files created by the <<_prepare>> step to create specific packages. The xref:configuration:packagers/snap.adoc[]
packager may log into the Snapcraft store and publish a snap if its `remotebBuild` filed is set to `false` for example.
Other packagers do not require additional customization of the prepared files and simply copy the files over from their
matching prepared directory to their respective package directory.
Packaged files will be placed at `${basedir}/out/jreleaser/${distributionName}/${packager}/prepared`.
Depends on <<_prepare>>.
== Publish
Publishes packaged files to their respective destinations. For example, for xref:configuration:packagers/homebrew.adoc[]
this means creating or updating a "hombrew-tap" repository, for xref:configuration:packagers/jbang.adoc[] this means
creating or merging a "jbang-catalog" repository.
Depends on <<_package>>.
Does not explicitly depend on <<_release>> however some packagers such as Snap require downloading distribution files
to locally build a snap.
== Announce
Announces the release to different media such as xref:configuration:announce/twitter.adoc[] or
xref:configuration:announce/zulip.adoc[]. xref:configuration:announce/sdkman.adoc[] requires that distribution
files had been released.
Depends on <<_changelog>>.
== Full Release
Executes all steps in single session in the following order:
* <<_changelog>>
* <<_checksum>>
* <<_sign>>
* <<_release>>
* <<_prepare>>
* <<_package>>
* <<_publish>>
* <<_announce>>