Publish packages
To make your package publicly available, you need to publish a package to NPM. Then you will be able to install it to any Datagrok instance using the package manager.
Public packages
Commit and push a new version in package.json
for a package to
the repository master branch. Then GitHub Actions will handle the rest.
- Clone public repository
- Make changes in the package or create a new package in the
packages/
directory - Test your changes locally
- Bump version for a package in
package.json
. The package version must comply with Semantic Versioning. All packages in the repository must be located in@datagrok
scope. - Commit and push all changes, including
package.json
, to the repository - On the push action GitHub Actions will run workflow:
- Build the package first
- Then, execute unit tests for the package before publishing.
- After successful build and test, the package is pushed to NPM registry
- Check that the GitHub Actions workflow finished successfully
- Now, you can install a new package version to the Datagrok platform using the package manager
Trigger GitHub Actions manually
If an error occurred for the action triggered by the commit, it is possible to trigger the action manually. GitHub will
check the package version from package.json
in the NPM repository. If the version is absent, it will run the
publishing job. Otherwise, it will run the test and build jobs instead.
- Use Packages workflow
- Press
run workflow
and set packages list to publish separated with spaces, for example:Demo Tutorials
. Use themaster
branch. ThenRun workflow
- Check that the GitHub Actions workflow finished successfully
The same steps can be applied for Libraries workflow , datagrok-tools package and datagrok-api package
Private packages
If the package can not be pushed to the NPM registry, you can publish it to the platform directly.
First, you need to configure local environment to access your Datagrok instance. Then, you can publish the package to the platform. See this guide for details.
grok publish <HOST>
If you want to use this package with other users, share the package with the group.