This document describes how TrustLink automates versioning, changelog generation, and artifact publishing.
The release process is fully automated using:
- Release Please — Creates release PRs based on conventional commits
- Semantic Versioning — Automatic version bumping (major.minor.patch)
- Conventional Commits — Standardized commit messages for changelog generation
- GitHub Actions — Builds WASM artifacts and publishes releases
When you merge commits to main with conventional commit messages:
git commit -m "feat(storage): add dual indexing for subject and issuer"
git commit -m "fix(validation): reject attestations with valid_from in past"Release Please automatically:
- Analyzes all commits since the last release
- Determines the next version based on commit types:
feat→ minor version bump (0.1.0 → 0.2.0)fix→ patch version bump (0.1.0 → 0.1.1)docs,test,chore→ no version bump
- Creates a Release PR that updates:
Cargo.tomlwith the new versionCHANGELOG.mdwith formatted commit messages
The Release PR is like any other PR:
- Review the version bump and changelog
- Make any final adjustments if needed
- Merge to
main
When the Release PR is merged:
- A git tag is created (e.g.,
v0.2.0) - A GitHub Release is published
- The
publish-releaseworkflow is triggered
The publish-release workflow:
- Checks out the release tag
- Builds the WASM contract
- Optimizes it with
soroban contract optimize - Attaches both binaries to the GitHub Release:
trustlink.wasm(unoptimized)trustlink.optimized.wasm(optimized for production)
See CONTRIBUTING.md — Commit Message Conventions for detailed guidelines.
Quick reference:
<type>(<scope>): <subject>
<body>
<footer>
Types:
feat— new feature (minor bump)fix— bug fix (patch bump)docs— documentationtest— testsrefactor— code refactoringperf— performance improvement (patch bump)chore— build, CI, dependencies
Example:
feat(storage): add dual indexing for subject and issuer lookups
The previous single index on subject made issuer-based queries O(n).
This adds a parallel index on issuer to enable fast lookups in both
directions. Queries now complete in O(log n) time.
Closes #42
| Commits | Version Change | Example |
|---|---|---|
feat only |
Minor | 0.1.0 → 0.2.0 |
fix only |
Patch | 0.1.0 → 0.1.1 |
feat + fix |
Minor | 0.1.0 → 0.2.0 |
docs, test, chore only |
No release | — |
BREAKING CHANGE footer |
Major | 0.1.0 → 1.0.0 |
Trigger: Push to main
Actions:
- Analyzes commits since last release
- Creates or updates a Release PR
- Outputs
release_createdandtag_namefor downstream workflows
Configuration: release-please-config.json
Trigger: GitHub Release published
Actions:
- Checks out the release tag
- Builds WASM contract
- Optimizes WASM with
soroban contract optimize - Uploads both binaries to the release
- Creates a summary in the GitHub Actions log
Artifacts:
trustlink.wasm— Unoptimized WASM binarytrustlink.optimized.wasm— Optimized for production deployment
Trigger: Pull request opened or updated
Actions:
- Validates PR title follows conventional commits format
- Ensures commit messages are properly formatted
- Blocks merge if validation fails
Before merging to main, you can preview the next version and the changelog entry that Release Please would generate — without creating a PR or modifying any files.
make changelog-previewThe command parses conventional commits since the last release tag, determines the version bump, and prints the formatted changelog section to stdout.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Changelog Preview since v0.1.0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Current version : 0.1.0
Next version : 0.2.0 (minor bump)
Version bump : minor
────────────────────────────────────────────────────────────
CHANGELOG.md entry that Release Please would generate:
────────────────────────────────────────────────────────────
## [0.2.0](../../compare/v0.1.0...v0.2.0) (2026-06-01)
### Features
* **storage:** add dual indexing for subject and issuer ([a1b2c3d](../../commit/a1b2c3d...))
* **api:** add has_any_claim and has_all_claims ([e4f5a6b](../../commit/e4f5a6b...))
### Bug Fixes
* **validation:** reject attestations with valid_from in past ([7c8d9e0](../../commit/7c8d9e0...))
────────────────────────────────────────────────────────────
NOTE: This is a local preview only. No files were changed.
Release Please may produce slightly different output when
it runs against the GitHub repository.
────────────────────────────────────────────────────────────
- Reads the current version from
Cargo.toml. - Finds the last release tag (
git describe --tags). If no tag exists, scans all commits. - Parses non-merge commits matching the Conventional Commits format.
- Applies the same bump rules and section visibility as
release-please-config.json:feat→ minor bump, shown in Featuresfix→ patch bump, shown in Bug Fixesperf→ patch bump, shown in Performancedocs→ shown in Documentation (no bump)refactor→ shown in Refactoring (no bump)test,chore→ hidden (no bump)BREAKING CHANGEfooter or!suffix → major bump
- Prints the preview and exits with code
0. No files are written.
If there are no releasable commits (only chore, test, docs, etc.), the command prints:
No releasable commits found since v0.1.0.
Release Please would not create a release PR.
make test-changelog-previewThis runs tests/test_changelog_preview.sh, which exercises the script in isolated temporary git repositories covering version bumping, section visibility, tag-based scoping, and idempotency.
If you need to manually trigger a release:
-
Create a release PR manually:
git checkout -b release/v0.2.0 # Update Cargo.toml version # Update CHANGELOG.md git commit -m "chore(release): v0.2.0" git push origin release/v0.2.0 # Open PR and merge
-
Create a git tag:
git tag -a v0.2.0 -m "Release v0.2.0" git push origin v0.2.0 -
Create a GitHub Release:
- Go to https://github.com/TrustLink/TrustLink/releases
- Click "Draft a new release"
- Select the tag
v0.2.0 - Add release notes
- Attach WASM artifacts
- Publish
- Go to https://github.com/TrustLink/TrustLink/releases
- Find the release (e.g.,
v0.2.0) - Download:
trustlink.wasm— Unoptimizedtrustlink.optimized.wasm— Optimized (recommended for production)
- Go to https://github.com/TrustLink/TrustLink/actions
- Find the
publish-releaseworkflow run - Download artifacts from the "Artifacts" section
# Download latest release
gh release download --repo TrustLink/TrustLink --pattern "*.wasm"
# Download specific release
gh release download v0.2.0 --repo TrustLink/TrustLink --pattern "*.wasm"See DEPLOYMENT.md for instructions on deploying the WASM contract to testnet or mainnet.
Quick start:
# Use the optimized WASM for production
soroban contract deploy \
--wasm target/wasm32-unknown-unknown/release/trustlink.optimized.wasm \
--source <account> \
--network testnetCause: No commits with conventional commit format since last release.
Solution: Ensure commits follow the format: feat: ..., fix: ..., etc.
Cause: Commit types don't match the expected format.
Solution: Check CONTRIBUTING.md — Commit Message Conventions.
Cause: publish-release workflow failed.
Solution:
- Check the workflow run at https://github.com/TrustLink/TrustLink/actions
- Review logs for build errors
- Manually build and attach artifacts if needed
Cause: soroban-cli installation failed in the workflow.
Solution: Check the publish-release workflow logs. The installation step should show any errors.
Configures Release Please behavior:
release-type: rust— Use Rust-specific versioningchangelog-path: CHANGELOG.md— Where to write the changelogversion-file: Cargo.toml— Which file to update with the version
Alternative configuration for semantic-release (if used instead of Release Please).
GitHub Actions workflow that runs Release Please.
GitHub Actions workflow that builds and publishes WASM artifacts.
GitHub Actions workflow that validates commit message format on PRs.