Automate uploading plugins to JetBrains Plugins Repository using GitHub Workflows

Lasini Liyanage
2 min readMar 19, 2020

Let’s assume you have the following directory structure in your github repository where you have your gradle-based Intellij Platform plugin

A permanent token is required to upload the plugin to JetBrains Plugins Repository. You can follow this link to create your permanent token using your JetBrains Hub account.

Once you have created the permanent token include it as a secret in your repository. You can find out how to do it from here.

Since you are done with the tokens now you can create a github workflow in plugin-repository itself to upload your plugin. Let’s see how you can get this done.

  1. At the root of your repository, create a directory named .github/workflows to store your workflow files.
  2. In .github/workflows , add a .yml or .yaml file for your workflow. For example, .github/workflows/uploadPluginWorkflow.yml

or you can just click Action → New workflow → Setup a workflow yourself to generate the .yml file.

In the uploadPluginWorkflow.yml file include the following workflow.

That’s it! You are done with your workflow.
In order to make this work, you need to ensure that there’s a publishPlugin task included in your build.gradle.

publishPlugin{
token intellijPublishToken
}

A default value(can be empty) for the Intellij publish token should also be included in the gradle.properties file.

intellijPlublishToken=’’

Now it’s just a matter of making a push request to your repository!

P.S.
It requires to add the plugin to the JetBrains Plugins Repository manually at least once. Therefore you can use this workflow to upload updated versions of your plugin easily.

Happy Coding! :)

--

--