Skip to Content
ConceptsReleases and version locks

Releases and version locks

A release is a version of your product you shipped, like 2.3.1, with the date it was released. Version locks use them to decide which versions each license unlocks, so you can sell “one year of updates” and let customers keep what they got, forever.

For Acme Photo, releases are the versions listed in the changelog: 2.1.0 in March, 2.3.0 in September, 3.0.0 the next summer. A photographer whose Personal license includes one year of updates gets every version during that year. After that, they keep the version they had, like 2.3, forever, and still get its bug fixes, but not 2.4 or 3.0. To know which version that is, LicenseManager needs the list of versions Acme Studio shipped, and when: that list is the releases.

Releases page of a product, listing versions with their release date and number of machines

Versions

LicenseManager reads versions as major.minor.patch, following semantic versioning :

  • A major version, like 2.0.0 to 3.0.0, is a new edition: what customers pay for again.
  • A minor version, like 2.3.0 to 2.4.0, adds features to an edition.
  • A patch, like 2.3.0 to 2.3.1, fixes bugs.

Bug fixes are never blocked. Every limit applies to major and minor versions only: a license allowed to use 2.3 can use 2.3.0, 2.3.1 and every future 2.3.x fix.

What releases do

Releases don’t block anything by themselves: a machine can validate a key with a version that isn’t a release, like an internal build. They’re used for three things:

  1. Resolving version locks: when a license’s updates end, the latest release by then tells which version it keeps.
  2. Suggesting a version when a license doesn’t allow the application’s version: the version_not_allowed error tells the latestAllowedVersion, the latest release the license allows, so your application can offer to install it. See handling validation errors.
  3. Adoption: how many active machines run each version.

So record each version when you ship it: a lock reached while a release is missing resolves to the previous release.

Create a release

Open the Releases page

Open the product, click Releases in the sidebar, then New release.

Enter the version

A semantic version like 2.3.1, without a v. A dash makes it a pre-release, like 2.4.0-beta.1. Each version is unique within the product.

New release form with the version and released fields

Choose when it’s released

Leave Released empty to release it now. Set a date in the past to record a version you shipped earlier, or in the future to schedule it: a future release is ignored until its date.

Creating releases by hand is fine to try things out, but in production they should come from your build pipeline: see when are releases created.

When are releases created?

A release should be created the moment you ship a version, by the same pipeline that builds and publishes it. Done by hand, a version is eventually forgotten: licenses whose updates end in the meantime lock to the previous release, and a lock reached before any release hard-codes nothing at all.

So add a step to your CI, right after the version is published, like when the installer is uploaded or the app store submission is approved. It calls createRelease with the version you shipped.

Create an API key for your CI

In the sidebar, click API keys, then New API key, and name it CI. See authentication. Use a key of the product’s mode: a live key (pk_) for the live product.

Store it as a secret

Save the key as a secret of your CI, like LICENSEMANAGER_API_KEY, never in your repository. Save the product ID too, shown under the product’s name on its dashboard, like LICENSEMANAGER_PRODUCT_ID. It’s not a secret.

Create the release when you ship

Send the version, without a v prefix. releasedAt is optional and defaults to now.

With curl

curl -X POST https://api.licensemanager.dev/v1/products/$LICENSEMANAGER_PRODUCT_ID/releases \ -H "x-api-key: $LICENSEMANAGER_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "version": "2.3.1" }'

It answers 201 with the release. A version the product already has answers 409 with version_taken: when your pipeline can run twice for the same version, like a retried job, treat it as a success. This script fails the build on any other error:

scripts/create-release.sh
#!/usr/bin/env bash set -euo pipefail VERSION="${1#v}" # "v2.3.1" becomes "2.3.1" status=$(curl -sS -o response.json -w "%{http_code}" \ -X POST "https://api.licensemanager.dev/v1/products/$LICENSEMANAGER_PRODUCT_ID/releases" \ -H "x-api-key: $LICENSEMANAGER_API_KEY" \ -H "Content-Type: application/json" \ -d "{ \"version\": \"$VERSION\" }") case "$status" in 201) echo "Release $VERSION created" ;; 409) echo "Release $VERSION already exists" ;; *) echo "Creating release $VERSION failed ($status):"; cat response.json; exit 1 ;; esac

In your CI

Runs when a GitHub release is published, with its tag as the version, like v2.3.1. Add LICENSEMANAGER_API_KEY as a secret and LICENSEMANAGER_PRODUCT_ID as a variable under Settings > Secrets and variables > Actions.

.github/workflows/release.yml
name: Release on: release: types: [published] jobs: licensemanager: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Create the release in LicenseManager env: LICENSEMANAGER_API_KEY: ${{ secrets.LICENSEMANAGER_API_KEY }} LICENSEMANAGER_PRODUCT_ID: ${{ vars.LICENSEMANAGER_PRODUCT_ID }} run: bash scripts/create-release.sh "${{ github.event.release.tag_name }}"

Already have a workflow building and publishing your app? Add the step at its end instead, after the upload, so a failed build never records a release.

Any other CI works the same: run the script, or the curl call, once the version is published.

Good to know

  • Pre-releases can be recorded too, like 2.4.0-beta.1: they’re ignored by version locks, so a beta channel doesn’t change what licenses keep. See pre-releases.
  • Staged rollouts. Publishing a version gradually? Create the release when it reaches everyone, or set releasedAt to that date: a scheduled release is ignored until then.
  • A missed version can be recorded later with a past releasedAt, but licenses whose lock was already reached keep the version they were locked at. See a release recorded late.
  • Test products don’t get the releases created later in the live product. To try your pipeline, run it with a test key (test_pk_) and the test product’s ID.

Pre-releases

Pre-releases, like 2.4.0-beta.1, are listed, but ignored by version locks and suggestions: a lock never resolves to a beta, and the latestAllowedVersion is never one. When your application validates with a pre-release, it counts as its version: 2.4.0-beta.1 is checked as 2.4.

Version locks

A license’s updates are set by its policy’s updates, and can be changed on the license. They come down to two things:

  • A hard-coded version: 2 allows every 2.x.x version and older, 2.3 every 2.3.x version and older. Without one, the license allows every version.
  • Lock dates, for limited updates: when the major version locks, and when the minor version locks.

How a lock is applied

Before the lock date

The license allows every version, including the ones not released yet.

When the lock date is reached

Within the hour, LicenseManager finds the latest stable release released by the lock date, and hard-codes it on the license:

  • When the major version locks, its major version is hard-coded, like 2. The license still gets the minor versions and bug fixes of version 2.
  • When the minor version locks, its major and minor versions are hard-coded, like 2.3. The license only gets the bug fixes of version 2.3. When a major version was already hard-coded, the latest release of that major version is used.

The lock date is then cleared, and the change is recorded as a license.updated event by Automation.

After the lock date

The license only allows versions up to its hard-coded version. Newer ones fail with version_not_allowed.

A lock that’s reached when the license is created, like with No updates, is applied right away, with the latest release at that moment.

Example

A license is created on March 1, 2026, with a policy giving updates for 1 year, Allow major version updates checked:

DateReleasesThe license allows
March 1, 20262.1.0Every version
September 1, 20262.3.0 is releasedEvery version
January 10, 20273.0.0-beta.1 is releasedEvery version
March 1, 2027Latest stable release: 2.3.0Lock: 2.3 is hard-coded
March 15, 20272.3.1 is released2.3.1: a bug fix of 2.3
June 1, 20273.0.0 is releasedUp to 2.3.x: 3.0.0 and 2.4.0 fail

With Allow major version updates unchecked, the major version locks when the license is created: it gets 2.x minor versions for a year, then 2.3, and never 3.0.0.

The policy options, as locks

Policy updatesMajor version locksMinor version locks
Free updatesNeverNever
Allow updates for limited time, major updates allowedAfter the durationAfter the duration
Allow updates for limited time, major updates not allowedAt creationAfter the duration
No updatesAt creationAt creation
Up to a fixed versionHard-coded, like 2 or 2.3Hard-coded with 2.3

Through the API, the two locks can have different durations, like major updates for 1 month and minor updates for 1 year, or the minor version can never lock. The minor version never locks before the major version. Such policies show as Custom in the app.

A lock reached before any stable release is cleared without hard-coding anything: the license then allows every version, forever. Create your current release before selling licenses with limited updates or no updates, and keep recording releases as you ship them.

Adoption

Each release shows the number of active machines running it: the machines whose last validated version is exactly the release’s version. v2.3.1 and 2.3.1 don’t match: send versions the way you record releases. The product’s dashboard shows active machines by version, releases or not. See release adoption.

Edit or delete a release

Click ⋯ on the release to Edit its version or date, or Delete it.

Edit release

Editing or deleting a release never changes the versions already hard-coded on licenses: it only affects the locks reached afterwards, and the suggested versions.

Checking versions offline

The license token your application receives holds the hard-coded version of the license in its mv claim, like "2.3", or null when it allows every version. Your application can check it before installing an update, without going online. See offline validation.

Edge cases

A version that isn’t semantic, like 2024.1 or build-42. Validation reads the leading numbers: 2024.1 is major 2024, minor 1. A version that doesn’t start with a number is refused when the license has a hard-coded version.

Older versions. Always allowed: a license locked at 2.3 can run 1.8.

A release recorded late. When you record 2.4.0 after a license’s lock was reached, even with a release date before the lock, the license keeps the version it was locked at. Edit the license’s updates to give it 2.4.

A scheduled release. A release dated after a lock date doesn’t count for that lock, even when it’s created before.

Locks are applied hourly. Between the lock date and the next hourly run, the license still allows every version.

Sorting releases. Versions sort by their numbers, then a pre-release before its stable release. Pre-releases of the same version sort as text: 2.0.0-beta.10 before 2.0.0-beta.2.

Test products. A test product starts with copies of the live product’s releases. Releases created later aren’t copied until you reset it.