Document slack webhook

This commit is contained in:
Andres Almiray
2021-04-20 21:54:35 +02:00
parent c62777abba
commit 641861eff5
8 changed files with 72 additions and 31 deletions

View File

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

View File

@@ -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.

View File

@@ -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[].

View File

@@ -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::
-->
<token>__DO_NOT_SET_HERE__</token>
<!--
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__</webhook>
<!--
The channel where the message will be sent to
Defaults to `3announce`.
@@ -253,6 +287,12 @@ jreleaser {
// 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[]

View File

@@ -508,6 +508,6 @@ Examples:
* `osx-arm`
* `windows`
* `linux`
* `linux-x86_32`
* `linux-x86_64`

View File

@@ -152,7 +152,7 @@ The following key/values may be defined in the properties file or as environment
| JRELEASER_SKIP_TAG | skip tagging the release
| JRELEASER_PRERELEASE | release is a prerelease (github/gitea)
| JRELEASER_GITHUB_TOKEN | a GitHub token with `repo` scope
| JRELEASER_GITLAB_TOKEN | a Gitlab token with `api` scope
| JRELEASER_GITLAB_TOKEN | a GitLab token with `api` scope
| JRELEASER_GITEA_TOKEN | a Gitea personal token
|===
@@ -180,7 +180,7 @@ The following key/values may be defined in the properties file or as environment
|===
| Key | Description
| JRELEASER_HOMEBREW_GITHUB_TOKEN | a GitHub token with `repo` scope
| JRELEASER_HOMEBREW_GITLAB_TOKEN | a Gitlab token with `api` scope
| JRELEASER_HOMEBREW_GITLAB_TOKEN | a GitLab token with `api` scope
| JRELEASER_HOMEBREW_GITEA_TOKEN | a Gitea personal token
|===
@@ -190,7 +190,7 @@ The following key/values may be defined in the properties file or as environment
|===
| Key | Description
| JRELEASER_CHOCOLATEY_GITHUB_TOKEN | a GitHub token with `repo` scope
| JRELEASER_CHOCOLATEY_GITLAB_TOKEN | a Gitlab token with `api` scope
| JRELEASER_CHOCOLATEY_GITLAB_TOKEN | a GitLab token with `api` scope
| JRELEASER_CHOCOLATEY_GITEA_TOKEN | a Gitea personal token
|===
@@ -200,7 +200,7 @@ The following key/values may be defined in the properties file or as environment
|===
| Key | Description
| JRELEASER_JBANG_GITHUB_TOKEN | a GitHub token with `repo` scope
| JRELEASER_JBANG_GITLAB_TOKEN | a Gitlab token with `api` scope
| JRELEASER_JBANG_GITLAB_TOKEN | a GitLab token with `api` scope
| JRELEASER_JBANG_GITEA_TOKEN | a Gitea personal token
|===
@@ -210,7 +210,7 @@ The following key/values may be defined in the properties file or as environment
|===
| Key | Description
| JRELEASER_SCOOP_GITHUB_TOKEN | a GitHub token with `repo` scope
| JRELEASER_SCOOP_GITLAB_TOKEN | a Gitlab token with `api` scope
| JRELEASER_SCOOP_GITLAB_TOKEN | a GitLab token with `api` scope
| JRELEASER_SCOOP_GITEA_TOKEN | a Gitea personal token
|===
@@ -220,7 +220,7 @@ The following key/values may be defined in the properties file or as environment
|===
| Key | Description
| JRELEASER_SNAP_GITHUB_TOKEN | a GitHub token with `repo` scope
| JRELEASER_SNAP_GITLAB_TOKEN | a Gitlab token with `api` scope
| JRELEASER_SNAP_GITLAB_TOKEN | a GitLab token with `api` scope
| JRELEASER_SNAP_GITEA_TOKEN | a Gitea personal token
|===
@@ -261,8 +261,9 @@ The following key/values may be defined in the properties file or as environment
[%header, cols="<1,<1", width="100%"]
|===
| Key | Description
| JRELEASER_SLACK_TOKEN | a bot or a personal Slack token
| Key | Description
| JRELEASER_SLACK_TOKEN | a bot or a personal Slack token
| JRELEASER_SLACK_WEBHOOK | the webhook URL
|===

View File

@@ -484,7 +484,7 @@ scoop bucket add duke https://github.com/duke/scoop-duke.git
scoop install app
----
IMPORTANT: Gitlab does not yet offer an URL that resolves to a latest release. You may need to adapt the value of
IMPORTANT: GitLab does not yet offer an URL that resolves to a latest release. You may need to adapt the value of
`checkverUrl` or update the tool template by removing that section.
Keep an eye on link:https://gitlab.com/gitlab-org/gitlab/-/issues/16821[].

View File

@@ -14,7 +14,7 @@ release:
# Repo in which the release will be created.
# icon:exclamation-triangle[]
gitlab:
# Disables or enables publication to Gitlab.
# Disables or enables publication to GitLab.
# defaults to `true`.
# icon:dot-circle[]
enabled: true
@@ -39,7 +39,7 @@ release:
# icon:dot-circle[]
name: app
# The Gitlab host url.
# The GitLab host url.
# Defaults to `gitlab.com`.
# icon:exclamation-triangle[]
host: gitlab.com
@@ -86,7 +86,7 @@ release:
# icon:dot-circle[] icon:eye-slash[]
skipTag: false
# The Gitlab API endpoint to use.
# The GitLab API endpoint to use.
# You can skip `/api/v4` as it will be added by default.
# Defaults to `pass:[https://gitlab.com]`.
# icon:dot-circle[]
@@ -213,7 +213,7 @@ TOML::
# icon:dot-circle[]
name = "app"
# The Gitlab host url.
# The GitLab host url.
# Defaults to `gitlab.com`.
# icon:exclamation-triangle[]
host = "gitlab.com"
@@ -260,7 +260,7 @@ TOML::
# icon:dot-circle[] icon:eye-slash[]
skipTag = false
# The Gitlab API endpoint to use.
# The GitLab API endpoint to use.
# You can skip `/api/v4` as it will be added by default.
# Defaults to `pass:[https://gitlab.com]`.
# icon:dot-circle[]
@@ -363,7 +363,7 @@ JSON::
// Repo in which the release will be created.
// icon:exclamation-triangle[]
"gitlab": {
// Disables or enables publication to Gitlab.
// Disables or enables publication to GitLab.
// defaults to `true`.
// icon:dot-circle[]
"enabled": true,
@@ -388,7 +388,7 @@ JSON::
// icon:dot-circle[]
"name": "app",
// The Gitlab host url.
// The GitLab host url.
// Defaults to `gitlab.com`.
// icon:exclamation-triangle[]
"host": "gitlab.com",
@@ -435,7 +435,7 @@ JSON::
// icon:dot-circle[] icon:eye-slash[]
"skipTag": false,
// The Gitlab API endpoint to use.
// The GitLab API endpoint to use.
// You can skip `/api/v4` as it will be added by default.
// Defaults to `pass:[https://gitlab.com]`.
// icon:dot-circle[]
@@ -553,7 +553,7 @@ Maven::
<gitlab>
<!--
Disables or enables publication to Gitlab.
Disables or enables publication to GitLab.
defaults to `true`.
icon:dot-circle[]
-->
@@ -588,7 +588,7 @@ Maven::
<name>app</name>
<!--
The Gitlab host url.
The GitLab host url.
Defaults to `gitlab.com`.
icon:exclamation-triangle[]
-->
@@ -651,7 +651,7 @@ Maven::
<skipTag>false</skipTag>
<!--
The Gitlab API endpoint to use.
The GitLab API endpoint to use.
You can skip `/api/v4` as it will be added by default.
Defaults to `pass:[https://gitlab.com]`.
icon:dot-circle[]
@@ -808,7 +808,7 @@ jreleaser {
// Repo in which the release will be created.
// icon:exclamation-triangle[]
gitlab {
// Disables or enables publication to Gitlab.
// Disables or enables publication to GitLab.
// defaults to `true`.
// icon:dot-circle[]
enabled = true
@@ -833,7 +833,7 @@ jreleaser {
// icon:dot-circle[]
name = 'app'
// The Gitlab host url.
// The GitLab host url.
// Defaults to `gitlab.com`.
// icon:exclamation-triangle[]
host = 'gitlab.com'
@@ -880,7 +880,7 @@ jreleaser {
// icon:dot-circle[] icon:eye-slash[]
skipTag = false
// The Gitlab API endpoint to use.
// The GitLab API endpoint to use.
// You can skip `/api/v4` as it will be added by default.
// Defaults to `pass:[https://gitlab.com]`.
// icon:dot-circle[]