From 641861eff5fc87f71ca5c3f8319195990fbfada6 Mon Sep 17 00:00:00 2001 From: Andres Almiray Date: Tue, 20 Apr 2021 21:54:35 +0200 Subject: [PATCH] Document slack webhook --- docs/modules/ROOT/pages/index.adoc | 10 ++--- .../configuration/pages/announce/discord.adoc | 2 +- .../pages/announce/discussions.adoc | 2 +- .../configuration/pages/announce/slack.adoc | 40 +++++++++++++++++++ .../configuration/pages/distributions.adoc | 2 +- .../configuration/pages/environment.adoc | 17 ++++---- .../configuration/pages/packagers/scoop.adoc | 2 +- .../configuration/pages/release/gitlab.adoc | 28 ++++++------- 8 files changed, 72 insertions(+), 31 deletions(-) diff --git a/docs/modules/ROOT/pages/index.adoc b/docs/modules/ROOT/pages/index.adoc index 86a237b..49d9fe2 100644 --- a/docs/modules/ROOT/pages/index.adoc +++ b/docs/modules/ROOT/pages/index.adoc @@ -7,19 +7,19 @@ 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! +such as GitHub, GitLab, or Gitea. Distribution files can additionally be published to be consumed by popular package managers +as Homebrew, Snapcraft, Scoop, or get ready to be launched via Jbang. Releases may be announced in a variety of channels such +as Twitter, Zulip, SDKMAN!, and others. image::jreleaser-tools.png[] -A release process can be customized with a `jreleaser.yml` file if using the xref:tools:cli.adoc[CLI] or +A release process can be customized with a `jreleaser.[yml|toml|json]` file if using the xref:tools:cli.adoc[CLI] or xref:tools:ant.adoc[ANT] options, or direct DSL configuration inside a `pom.xml` (xref:tools:maven.adoc[Maven]) or `build.gradle` (xref:tools:gradle.adoc[Gradle]) file. Once setup, you can create a new release by invoking the `full-release` command. -Every step of the release process is configurable. Inputs can be parameterized externally; several input files can be +Every step of the release process is configurable. Inputs may be parameterized externally; several input files may be provided as templates. == Acknowledgments diff --git a/docs/modules/configuration/pages/announce/discord.adoc b/docs/modules/configuration/pages/announce/discord.adoc index f288fbd..a03f87f 100644 --- a/docs/modules/configuration/pages/announce/discord.adoc +++ b/docs/modules/configuration/pages/announce/discord.adoc @@ -1,6 +1,6 @@ = Discord -Posts a message to a link:https://discord.im/[Discord] room. You must create a custom webhook for this announcer to work. +Posts a message to a link:https://discord.com/[Discord] room. You must create a custom webhook for this announcer to work. 1. Log into the target discord server. 2. Select the channel you want to integrate to, click on its settings icon. diff --git a/docs/modules/configuration/pages/announce/discussions.adoc b/docs/modules/configuration/pages/announce/discussions.adoc index 2820f9a..92ec209 100644 --- a/docs/modules/configuration/pages/announce/discussions.adoc +++ b/docs/modules/configuration/pages/announce/discussions.adoc @@ -1,4 +1,4 @@ -= Discussions += GitHub Discussions Posts a message to link:https://docs.github.com/en/discussions[GitHub Discussions]. You must provide a GitHub token with the `write:discussion` scope enabled. Will use the same token set in xref:configuration:release/github.adoc[]. diff --git a/docs/modules/configuration/pages/announce/slack.adoc b/docs/modules/configuration/pages/announce/slack.adoc index d514721..1a0cb49 100644 --- a/docs/modules/configuration/pages/announce/slack.adoc +++ b/docs/modules/configuration/pages/announce/slack.adoc @@ -7,6 +7,15 @@ scopes set: * chat:write * chat:write.public +1. Log into the target Slack workspace. +2. Create a link:https://api.slack.com/apps/new[Slack app]. +4. Click on Incoming Webhooks. +5. Create a new webhook. +6. Copy the generated webhook URL. + +IMPORTANT: Webhooks are not protected, anyone with access to the webhook URI can send messages to the target room. Prefer +setting the `JRELEASER_SLACK_WEBHOOK` environment variable over explicitly setting a value in the configuration DSL. + include::partial$legend.adoc[] [tabs] @@ -42,6 +51,12 @@ announce: # icon:exclamation-triangle[] icon:eye-slash[] token: __DO_NOT_SET_HERE__ + # The webhook associated with a specific Discord room. + # If left unspecified, the `JRELEASER_SLACK_WEBHOOK` + # environment variable must be defined. + # icon:exclamation-triangle[] icon:eye-slash[] + webhook: __DO_NOT_SET_HERE__ + # The channel where the message will be sent to # Defaults to `#announce`. # icon:dot-circle[] @@ -88,6 +103,12 @@ TOML:: # icon:exclamation-triangle[] icon:eye-slash[] token = "__DO_NOT_SET_HERE__" + # The webhook associated with a specific Discord room. + # If left unspecified, the `JRELEASER_SLACK_WEBHOOK` + # environment variable must be defined. + # icon:exclamation-triangle[] icon:eye-slash[] + webhook = "__DO_NOT_SET_HERE__" + # The channel where the message will be sent to # Defaults to `#announce`. # icon:dot-circle[] @@ -136,6 +157,12 @@ JSON:: // icon:exclamation-triangle[] icon:eye-slash[] "token": "__DO_NOT_SET_HERE__", + // The webhook associated with a specific Discord room. + // If left unspecified, the `JRELEASER_SLACK_WEBHOOK` + // environment variable must be defined. + // icon:exclamation-triangle[] icon:eye-slash[] + "webhook": "__DO_NOT_SET_HERE__", + // The channel where the message will be sent to // Defaults to `#announce`. // icon:dot-circle[] @@ -196,6 +223,13 @@ Maven:: --> __DO_NOT_SET_HERE__ + + __DO_NOT_SET_HERE__ + @@ -588,7 +588,7 @@ Maven:: app @@ -651,7 +651,7 @@ Maven:: false