A GitHub Actions workflow has been set up to automate building, scanning, packaging, and releasing npm packages in the packages/ directory.
You can manually trigger the release workflow from the GitHub Actions UI.
**Stable release **
- Create a release branch. A qualified branch name should start with "release-" or "release/", case-insensitive. e.g:
release/xrpl@4.3.8,release-xrpl-4.3.8,Release/xrpl@4.3.8. - Update the
versionfield inpackages/<package_name>/package.jsonto the intended release version.{ "name": "<package_name>", "version": "x.y.z" } - Run npm i to refresh package-lock.json and commit it.
**Beta release **
- Create a release branch. There is no restriction for branch name.
- Update the
versionfield inpackages/<package_name>/package.jsonto the intended beta release version.{ "name": "<package_name>", "version": "x.y.z-<beta|rc>.a" } - Run
npm ito refreshpackage-lock.jsonand commit it.
-
Go to GitHub → Actions → Release Pipeline → Run workflow (must be triggered from
main). -
Triggering the workflow with following requied inputs:
- Stable release
release_branch_name: e.g.,release/xrpl@4.3.8orrelease-xrpl-4.3.8(must start withrelease-/release/, case-insensitive).package_name: e.g.,xrpl.npmjs_dist_tag:latest.
- Stable release
Example: release_branch_name=release/xrpl@4.3.8, package_name=xrpl, npmjs_dist_tag=latest.
- Beta release (publishes as
<tag>-experimental)release_branch_name: e.g.,feature/xrpl-beta(no naming restriction).package_name: e.g.,xrpl.npmjs_dist_tag: a non-latesttag likebetaorrc(must match[a-z][a-z0-9._-]{0,127}and not start withv+ digit or a digit).
Example: release_branch_name=feature/xrpl-beta, package_name=xrpl, npmjs_dist_tag=feature-a (will be published as feature-a-experimental, -experimental will be automatically appended by the workflow).
- For stable release, after
Pre Release Pipelinehas been executed, update the PR automatically created by the release pipeline (release branch → main branch) from Draft to Ready for Review, and ensure all CI tests have passed.
The pipeline will pause at the "Print Test/Security scan result and invite Dev team to review" step and also before the final release step, relevant team should review the release details and scan result. Stable release will be reviewed by infosec team as Sec reviewer. Beta release will be reviewed by security champions from Dev team.
- Extracts the version from
packages/<package_name>/package.json. - Validate inputs.
- Triggers the
faucet_test.ymlandnodejs.ymlworkflows to run unit, integration, and faucet tests against the specified Git ref. Integration and taucet tests are skipped for beta release. - Ensures the code at the given Git ref passes required tests.
- Builds the npm package.
- Generates a CycloneDX SBOM (Software Bill of Materials).
- Runs a vulnerability scan with Trivy.
- Uploads the SBOM to OWASP Dependency-Track for tracking vulnerabilities.
- Packages the module with Lerna and uploads the tarball as an artifact.
- Posts failure notifications to Slack..
- Create a Github issue for detected vulnerabilities.
- Automatically raise a PR from relase branch to main branch for stable release
- Generate a summary of:
- Package name
- Version
- Vulnerability scan artifacts
- Requires the approvers to manually review security reports on the Actions page.
- Requires manual approval (Set up through GitHub Environment).
- Creates a GitHub Release with a tag like
<package_name>@<version>. - Downloads the built package tarball.
- Publishes the package to the public npm registry.
- Posts success or failure notifications to Slack.
The GitHub release and git tag are named like this:
<package_name>@<version>
Example:
xrpl@2.3.1
-
The release workflow does not overwrite existing tags. If the same version tag already exists, the workflow will fail.
-
Vulnerability scanning does not block the release, but it is the approvers' responsibility to review the scan results in the Review stage.
-
For stable release, after
Pre Release Pipelinehas been executed, update the PR automatically created by the release pipeline (release branch → main branch) from Draft to Ready for Review, and ensure all CI tests have passed.