Skip to content
Christ:o)ph Graupner edited this page Dec 1, 2021 · 5 revisions

Release flow

The release process depends on the workflows already described above. When your main branch receives a new pull request or a regular push, the Build workflow runs multiple tests on your plugin and prepares a draft release.

Release draft

The draft release is a working copy of a release, which you can review before publishing. It includes a predefined title and git tag, which is the current version of the plugin, for example, v0.0.1. The changelog is provided automatically using the gradle-changelog-plugin. An artifact file is also built with the plugin attached. Every new Build overrides the previous draft to keep your Releases page clean.

When you edit the draft and use the Publish release button, GitHub will tag your repository with the given version and add a new entry to the Releases tab. Next, it will notify users that are watching the repository, and it will trigger the final Release workflow.

Plugin signing

Plugin Signing is a mechanism introduced in the 2021.2 release cycle to increase security in JetBrains Marketplace and all of our IntelliJ-based IDEs.

JetBrains Marketplace signing is designed to ensure that plugins are not modified over the course of the publishing and delivery pipeline.

The current project provides a predefined plugin signing configuration that lets you sign and publish your plugin from the Continuous Integration (CI) and local environments. All the configuration related to the signing should be provided using environment variables.

To find out how to generate signing certificates, check the Plugin Signing section in the IntelliJ Platform Plugin SDK documentation.

Publishing the plugin

Releasing a plugin to JetBrains Marketplace is a straightforward operation that uses the publishPlugin Gradle task provided by the [gradle-intellij-plugin][gh:gradle-intellij-plugin]. In addition, the Release workflow automates this process by running the task when a new release appears in the GitHub Releases section.

TIP: Set a suffix to the plugin version to publish it in the custom repository channel, i.e. v1.0.0-beta will push your plugin to the beta [release channel][docs:release-channel]. The authorization process relies on the PUBLISH_TOKEN secret environment variable, specified in the Secrets section of the repository Settings.

You can get that token in your JetBrains Marketplace profile dashboard in the [My Tokens][jb:my-tokens] tab.

Important: Before using the automated deployment process, it is necessary to manually create a new plugin in JetBrains Marketplace to specify options like the license, repository URL, etc. Please follow the [Publishing a Plugin][docs:publishing] instructions.

Environment variables

Some values used for the Gradle configuration shouldn't be stored in files to avoid publishing them to the Version Control System.

To avoid that, environment variables are introduced, which can be provided within the Run/Debug Configuration within the IDE, or on the CI – like for GitHub: ⚙️ Settings > Secrets.

Environment variables used by the current project are related to the plugin signing and publishing.

Environment variable name Description
PRIVATE_KEY Certificate private key, should contain: -----BEGIN ENCRYPTED PRIVATE KEY-----
...
-----END ENCRYPTED PRIVATE KEY-----
PRIVATE_KEY_PASSWORD Password used for encrypting the certificate file.
CERTIFICATE_CHAIN Certificate chain, should contain: -----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE----
PUBLISH_TOKEN Publishing token generated in your JetBrains Marketplace profile dashboard.

For more details on how to generate proper values, check the relevant sections mentioned above.

To configure GitHub secret environment variables, go to the ⚙️ Settings > Secrets section of your project repository:

Settings > Secrets