NitroSQLite
Guides

Releasing Nitro SQLite

How maintainers publish the React Native and NitroUI packages and recover a failed release.

Every push to main keeps a Release Please PR open with the next version and changelog. Conventional commits since the last release choose the version. fix and perf commits make a patch release, feat commits make a minor release, and breaking changes (! or a BREAKING CHANGE: footer) make a major release. The workflow also commits the regenerated workspace and CocoaPods lockfiles to that PR. The release PR runs only the Linux checks, like every other PR.

Merging the PR starts the release checks: the Linux checks plus every native configuration, on the merge commit. That covers all iOS configurations, including the oldest supported Xcode, macOS, and every Android minSdk variant. Only after they pass does Release Please create the vX.Y.Z tag and the draft release at that commit. The workflow then publishes as described below.

To choose the version yourself, release a maintenance branch, or release without waiting for a merge, start the workflow manually:

Open the Release workflow in GitHub Actions, select Run workflow, and choose the branch containing the changes to release. The same flow supports main and any maintenance or release branch that contains the release automation.

Set version to patch, minor, major, prerelease, or an exact version such as 11.0.0 or 11.0.0-beta.0. The workflow resolves the version from the selected branch and existing tags. The six React Native packages, the six NitroUI packages, the workspace, and the React Native example keep the same version. Existing patch tags from the same version line prevent accidental reuse across sibling branches.

The workflow creates or updates a Release Please PR against that branch, regenerates the workspace and CocoaPods lockfiles, and commits the generated files through GitHub's signed commit API. It waits for the usual PR checks and merges when GitHub permits the merge. Required reviews and branch protection still apply. No manually prepared version commit or separate publishing trigger is needed.

After merging, the workflow runs the release checks on the merge commit. When they pass, Release Please creates a draft release and its tag at that commit. The workflow validates and builds the React Native packages and then the NitroUI packages, checks their npm trusted publishers, and publishes all twelve with provenance. It attaches the Android example APK before publishing the GitHub announcement.

Local archive builds do not publish packages or create release tags.

Announcements and changelog

Supply announcement when starting the workflow, or commit docs/releases/vX.Y.Z.md on the selected branch beforehand. The workflow saves supplied text in that versioned file. If neither exists, it supplies a short version announcement.

Every release includes the announcement, a Markdown divider, and the current version's complete Release Please changelog. The existing changelog groups are retained. GitHub detects first-time contributors using the previous reachable release tag and the exact release commit. The release includes a new contributors section only when contributors are detected.

Maintenance channels

Version 9 releases use the npm legacy-9 channel and never become GitHub's latest release. Other versions use latest unless a newer version is already published. Older maintenance versions use maintenance-MAJOR.MINOR instead, and do not move GitHub's latest release backwards.

Prerelease channels

A prerelease version publishes to an npm channel named after its prerelease identifiers, without the trailing number. For example, 11.0.0-alpha.0 publishes to alpha and installs with react-native-nitro-sqlite@alpha. Prereleases never move latest, and their GitHub release is marked as a prerelease.

Start a channel by releasing its branch with an exact version, such as 11.0.0-alpha.0. Later releases from the same branch can use prerelease, which increments the trailing number to 11.0.0-alpha.1. Each channel counts only its own prerelease tags, so the 11.0.0-nitro-v1.N tags on release/nitro-v1 don't affect the 11.0.0-alpha.N line on main.

Releasing patch from a prerelease finishes that version. minor finishes it only when its patch number is 0, and major only when its minor and patch numbers are 0. Otherwise they move to the next minor or major version. For example, 11.0.0-alpha.3 becomes 11.0.0 for major, and 11.2.3-alpha.0 becomes 11.2.3 for patch, 11.3.0 for minor, and 12.0.0 for major.

Credentials

Configure a RELEASE_PLEASE_TOKEN repository secret with a fine-grained personal access token that can write repository contents, pull requests, and issues. Include workflows write access for release branches whose workflows differ from the default branch. The token must be allowed to create and merge release PRs subject to the repository's normal rules. A token separate from the workflow's built-in token makes automated commits trigger the usual CI checks.

During migration, the existing RELEASE_IT_GITHUB_TOKEN secret is accepted as a fallback with the same permissions. No npm publishing token is needed. All twelve React Native and NitroUI packages require a trusted publisher for margelo/nitro-sqlite, workflow release.yml, with no environment.

Recovering a failed release

Use GitHub's Re-run failed jobs to continue the same release after fixing a transient failure or completing required reviews. When a release check failed, re-running its failed jobs continues with the tag, publication, APK, and announcement once they pass.

If a tag and draft already exist, start the Release workflow on the same branch with release_tag set to vX.Y.Z. This skips the version bump and release PR. It runs the release checks again on the tag before publishing.

Until the merged release PR is tagged, it keeps its autorelease: pending label. Every later push to main runs the release checks on its merge commit again and tags it once they pass.

When a release check fails because of a real bug:

  1. Remove the autorelease: pending label from the merged release PR, so later pushes stop retrying it. No tag, draft, or npm version exists for this version yet.
  2. Revert the release commit on main in a PR titled chore: revert release X.Y.Z. This restores the previous version in the manifests, package files, and changelog. Release Please finds the previous release by that version, so without the revert its next changelog would not start at the previous release.
  3. Fix the bug in a normal PR.
  4. Merge the next release PR. Release Please proposes X.Y.Z again, or a higher version if newer commits require it, and the release checks run on its merge commit.

Publication retries skip a package only when the existing npm version records the same Git commit. The workflow refuses a version published from another commit. npm hides a new version for several minutes while it processes it, so the workflow waits up to 20 minutes for every published version to appear. A retry during that time still succeeds when the hidden version comes from the same commit. An APK failure leaves the GitHub release as a draft; retrying attaches the APK and publishes the assembled notes without another version bump.

The migration must be merged or cherry-picked onto an older maintenance branch before running this workflow there. The workflow selects its baseline at runtime, so no branch-specific Release Please configuration is needed.

On this page