Skip to content

Publishing your plugin

All plugins MUST be served from the windy-plugins.com domain. This is to ensure that the plugin is served from a secure and reliable source, and that published plugins, once checked and approved, are not modified.

A new version of the plugin must be published as a new release, with higher version number.

Properly published plugins are uploaded to URL like this https://windy-plugins.com/3/windy-plugin-my-plugin/0.1.1/plugin.min.js, where 3 is your Windy.com user Id, windy-plugin-my-plugin is the plugin name and 0.1.1 is the plugin version.

Assuming, that your repository is on GitHub, either private or public, you can publish your plugin via GitHub Actions.

Setup GitHub Workflow

1. Create a new Windy API key

Create your Windy Plugins API key at https://api.windy.com/keys

Create API key

2. Add the API key to your GitHub repository

In your GitHub repository, go to Settings, Secrets and Variables, Actions. Click New repository secret and create secret WINDY_API_KEY with the API key you created at https://api.windy.com/keys

Add API key

3. Run the "publish-plugin" action

To publish the plugin, go to Actions, publish-plugin, Run workflow and select the branch from which you want to publish the plugin.

Run workflow

4. Get URL of your published plugin

After the workflow is finished, go to the job log, expand the Publish Plugin stage and copy the plugin installation URL.

Get Plugin URL

My plugin is published, what's next?

Suppose, you have published your plugin and you have the plugin URL that looks like this https://windy-plugins.com/3/windy-plugin-my-plugin/0.1.1/plugin.min.js.

By default, new plugins are marked as private (using private: true in pluginConfig.ts). Feel free to share this URL with your friends or within your corporation.

If you want to offer your plugin to other Windy.com users, remove the private flag or set it to private: false. Then let us know here so we can review and approve your plugin.

Once approved, your plugin will be available to all Windy.com users.

Publishing your plugin manually

If you can not ue GitHub Actions, you can publish your plugin manually. Just create a new release in your GitHub repository and upload the plugin to the Windy.com server, via the script like this:

bash
#!/bin/bash

WINDY_API_KEY=PutYourAPIKeyHere

OWNER="Put your username here"

SHA=$(git rev-parse --short HEAD)

REPOSITORY="Put URL of your repository here"

DIR=dist

cd ./$DIR
echo "Creating plugin archive..."
echo "{\"repositoryName\": \"${REPOSITORY}\", \"commitSha\": \"${SHA}\", \"repositoryOwner\": \"${OWNER}\"}" > ./plugin-info.json
jq -s '.[0] * .[1]' ./plugin.json ./plugin-info.json > ./plugin2.json
rm ./plugin.json && mv ./plugin2.json ./plugin.json
tar cf ./plugin.tar --exclude='./plugin.tar' .
echo "Publishing plugin..."
curl -s --fail-with-body -XPOST 'https://node.windy.com/plugins/v1.0/upload' -H "x-windy-api-key: ${WINDY_API_KEY}" -F "plugin_archive=@./plugin.tar"
rm ./plugin.tar