This document describes how to create and publish releases for Plenum.
Plenum uses cargo-dist to automate the release process. Releases are published to:
- GitHub Releases: Binary artifacts for multiple platforms
- crates.io: Rust package registry
- npm: JavaScript/Node.js package registry
Before creating your first release, you need to set up trusted publishing:
crates.io requires the first release to be manual:
cargo publishAfter the first release, configure trusted publishing on crates.io:
- Go to your package settings on crates.io
- Add GitHub Actions as a trusted publisher
- Specify:
- Repository:
reflex-search/plenum - Workflow:
publish-packages.yml
- Repository:
First, you need to publish the package manually once:
# Ensure you have npm >= 11.5.1
npm --version
# Login to npm
npm login
# Publish manually for the first time
npm publish --access publicAfter the first manual publish, configure trusted publishing:
- Go to your package page:
https://www.npmjs.com/package/plenum - Click the "Settings" tab
- Scroll down to the "Publishing access" section
- Click "Automate publishing with GitHub Actions" or "Add trusted publisher"
- Fill in the form (case-sensitive!):
- Repository owner:
reflex-search - Repository name:
plenum - Workflow name:
publish-packages.yml(must include .yml extension) - Environment name: (leave blank)
- Repository owner:
- Click "Add" or "Save"
Optional but recommended: After configuring trusted publishing, go back to Publishing access and select "Require two-factor authentication and disallow tokens" for enhanced security.
Note: Trusted publishing uses OIDC tokens automatically - no npm tokens or secrets needed in your workflow.
-
Update Version:
# Edit Cargo.toml and update version field version = "0.2.0"
-
Update Changelog:
# Edit CHANGELOG.md # Move items from [Unreleased] to new version section # Add release date
-
Commit Changes:
git add Cargo.toml CHANGELOG.md git commit -m "chore: release v0.2.0" -
Create and Push Tag:
git tag v0.2.0 git push origin main --tags
Once you push a version tag (e.g., v0.2.0), the following happens automatically:
-
Release Workflow (
.github/workflows/release.yml):- Triggered by the version tag
- Builds binaries for all target platforms:
- Linux (x86_64, aarch64)
- macOS (x86_64, aarch64)
- Windows (x86_64)
- Generates installers:
- Shell script (
plenum-installer.sh) - PowerShell script (
plenum-installer.ps1) - npm package (
plenum-npm-package.tar.gz)
- Shell script (
- Creates checksums for all artifacts
- Creates a GitHub Release with all artifacts
-
Publish Packages Workflow (
.github/workflows/publish-packages.yml):- Triggered after successful release workflow
- Publishes to crates.io using trusted publishing (OIDC)
- Downloads npm package from GitHub Release
- Publishes to npm with provenance
After release, users can install Plenum via:
npm install -g plenumcurl --proto '=https' --tlsv1.2 -LsSf \
https://github.com/reflex-search/plenum/releases/latest/download/plenum-installer.sh | shirm https://github.com/reflex-search/plenum/releases/latest/download/plenum-installer.ps1 | iexcargo install plenumDownload platform-specific binaries from GitHub Releases.
Plenum follows Semantic Versioning:
- MAJOR: Breaking changes
- MINOR: New features (backward compatible)
- PATCH: Bug fixes (backward compatible)
You can manually trigger the publish workflow for a specific tag:
gh workflow run publish-packages.yml -f tag=v0.2.0- Check the GitHub Actions logs
- Ensure all tests pass
- Verify cargo-dist configuration in
dist-workspace.toml
- Verify trusted publishing is configured
- Check that version doesn't already exist
- Ensure Cargo.toml metadata is valid
- Verify trusted publishing is configured
- Check npm package name isn't taken
- Ensure npm-package artifact was generated in release
- dist-workspace.toml: cargo-dist configuration
- .github/workflows/release.yml: Release automation (auto-generated)
- .github/workflows/publish-packages.yml: Package publishing
- Cargo.toml: Package metadata and version
- CHANGELOG.md: Version history
All publishing uses trusted publishing (OIDC):
- No long-lived tokens required
- Authentication via GitHub Actions identity
- Time-limited credentials (30 minutes)
- Reduced risk of credential leakage