This file documents the current (and evolving) release process for KSON.
When main is ready to have a release cut from it:
- Choose an appropriate
X.Y.Zversion number for the release by incrementing the latest tag (see existing tags here) according to Semantic Versioning guidelines - Create a branch
release/X.Y.Zfor this release
- Search the codebase for
[[kson-version-num]]again and update all version numbers to be snapshot/development versions. Generally this will bump to the next minor version afterX.Y.Z, ie.X.(Y+1).0. Here is a hopefully complete checklist of the artifacts we version and publish:- Gradle-based projects use centralized version from KsonVersion.kt:
- Update
BASE_VERSIONtoX.(Y+1).0- this applies to kson-lib, kson-tooling-lib, tooling/jetbrains, and tooling/cli - Snapshot versions use stable
{BASE_VERSION}-SNAPSHOTfor builds, and SHA-qualified{BASE_VERSION}-{gitSha}-SNAPSHOTfor Maven publishing
- Update
- KSON Core internals:
x.(PREVIOUS_NUM+1)-SNAPSHOT(note this is the special incrementing internal version, updateinternalBaseVersionthere) - lib-rust: kson Cargo.toml, kson-sys Cargo.toml, kson-sys build script:
X.(Y+1).0-dev - lib-python:
X.(Y+1).0.dev0 - tooling/lsp-clients:
X.(Y+1).0-dev.0 - tooling/lsp-clients/vscode:
X.(Y+1).0-dev.0 - tooling/lsp-clients/shared:
X.(Y+1).0-dev.0 - tooling/lsp-clients/monaco:
X.(Y+1).0-dev.0 - tooling/language-server-protocol:
X.(Y+1).0-dev.0
- Gradle-based projects use centralized version from KsonVersion.kt:
- Search the codebase for
[[kson-version-num]]to find and update all the development/snapshot versions to the newX.Y.Zversion. Here's a hopefully complete checklist of the artifacts we version and publish that should marked[[kson-version-num]]:- Gradle-based projects use centralized version from KsonVersion.kt:
- Update
BASE_VERSIONtoX.Y.Z- this applies to kson-lib, kson-tooling-lib, tooling/jetbrains, and tooling/cli - Build with
-Prelease=trueflag to produce release versions (without SNAPSHOT suffix):./gradlew build -Prelease=true
- Update
- KSON Core internals (NOTE: uses a different versioning scheme and will NOT be set to
X.Y.Z. See the comments there for details) - lib-rust, lib-python, tooling/lsp-clients: These require manual version updates (no
-Preleaseflag support yet):
- Gradle-based projects use centralized version from KsonVersion.kt:
- Commit and push the
release-X.Y.Z-prepbranch - Run CircleCI across ALL supported platforms on the
release-X.Y.Z-prepbranch (only linux builds are run on every pull request)- Fix any platform specific issues found (hopefully this is rare... if it is common and painful, we may need to reconsider running cross-platform CI more often)
- Create tag
vX.Y.Zif/when CircleCI is green for all platforms - Publish the release according the Publishing process below
-
Prepare release notes based on the changes made in this release. Sample Github comparison URL to see this release's changes:
https://github.com/kson-org/kson/compare/[tag of current version]...release/X.Y.Z -
TODO flesh out this documentation
kson-lib Publishing Process
The project uses the Vanniktech Maven Publish plugin to publish to Maven Central Portal. This process publishes both:
org.kson:kson(public API from kson-lib)org.kson:kson-internals(internal implementation from root build that is deployed with kson-lib)
- You will need a user account on https://central.sonatype.com/
- You will need a GPG key pair with the public key published to https://keyserver.ubuntu.com/
Ensure you have credentials for both of these in your ~/.gradle/gradle.properties file:
mavenCentralUsername=<your-username>
mavenCentralPassword=<your-password>
# GPG signing credentials
signing.keyId=<your-key-id>
signing.password=<your-passphrase>
signing.secretKeyRingFile=<path-to-secring.gpg>-
Ensure you've checked out the tag to be released and that
git statusis clean -
Publish to Maven Central:
./gradlew publishAllPublicationsToMavenCentralRepository
-
Verify the publications are valid and ready to be published: https://central.sonatype.com/publishing/deployments
-
Manually release: we have
automaticRelease = falseas a final gate/protection, so once everything looks good at https://central.sonatype.com/publishing/deployments for this release, click Publish
lib-rust Publishing Process
- todo doc process
kson-lib npm package Publishing Process
The KSON JavaScript/TypeScript library is published to npm as @kson_org/kson with support for both browser and Node.js environments.
- You will need an npm account at https://www.npmjs.com/
- You will need publish access to the
@kson_org/ksonpackage
-
Ensure you've checked out the tag to be released and that
git statusis clean -
Build the universal JavaScript package:
./gradlew buildUniversalJsPackage
This builds a package for both the browser and Node.js and bundles it into
kson-lib/build/js-package -
Publish to npm:
cd kson-lib/build/js-package npm login npm publish --access=public -
Verify the package is available at: https://www.npmjs.com/package/@kson_org/kson
lib-python Publishing Process
The Python package is published to PyPI as kson-lang using platform-specific wheels built by CircleCI.
- You will need a PyPI account at https://pypi.org/
- You will need the PyPI API token (stored in MM 1Password)
-
Ensure you've checked out the tag to be released and that
git statusis clean -
Create the source distribution:
./gradlew createDist
-
Download the pre-built wheels from the CircleCI build for this tag:
- Download the wheel artifacts from CircleCI (they will download as
.zipfiles) - Copy all wheels into the
lib-python/dist/directory - Change the file extensions from
.zipto.whl
- Download the wheel artifacts from CircleCI (they will download as
-
Upload to PyPI using
twine:cd lib-python ./uvw run python -m twine upload --repository pypi dist/* --verbose
- Use the API Token when prompted
-
Verify the package is available at: https://pypi.org/project/kson-lang/
tooling/cli Publishing Process
- todo doc process
tooling/lsp-clients Publishing Process
The KSON language support includes VSCode extensions published to both the Visual Studio Code Marketplace and Open VSX Registry.
- GitHub account with access to publish to the marketplaces
- Access to https://marketplace.visualstudio.com
- Access to https://open-vsx.org
-
Ensure you've checked out the tag to be released and that
git statusis clean -
Build the VSCode extension package:
./gradlew clean && ./gradlew npm_run_buildVSCodeThis creates a VSIX package at
tooling/lsp-clients/vscode/dist/vscode-kson-plugin.vsix -
Publish to VS Code Marketplace:
- Login to https://marketplace.visualstudio.com with GitHub
- Navigate to the KSON extension
- Update/upload the extension with the built VSIX file
-
Publish to Open VSX Registry:
- Login to https://open-vsx.org/user-settings/extensions with GitHub
- Navigate to the KSON extension
- Update/upload the extension with the built VSIX file
-
Verify the extensions are available at:
- VS Code Marketplace: https://marketplace.visualstudio.com/items?itemName=kson.kson
- Open VSX: https://open-vsx.org/extension/kson/kson
tooling/jetbrains Publishing Process
Note: it is possible to automate this process us some Gradle tasks provided by the IntelliJ Platform Gradle Plugin, if/when this manual process become onerous.
-
Ensure you have the tag you wish to release checked out and that your Git status is clean.
-
Build the plugin distribution:
./gradlew :tooling:jetbrains:buildPlugin
This creates a ZIP archive ready for deployment in
tooling/jetbrains/build/distributions/KSON-[version].zip -
Manually upload to JetBrains Marketplace:
- Go to https://plugins.jetbrains.com/plugin/28510-kson-language and ensure you are logged in as a "Developer" of of the plugin.
- Upload the ZIP file from the distributions folder