This document describes the release process for the Autonomys Auto SDK.
The Autonomys Auto SDK follows a structured release process that includes version management, changelog generation, and package publishing. We use:
- Lerna: For managing versioning and publishing in our monorepo
- Conventional Commits: For structured commit messages and PR titles
- GitHub Actions: For automating the release workflow
- PR-Based Changelog: We generate changelogs exclusively based on merged Pull Requests
- Development Phase: Features, fixes, and improvements are developed and merged into the main branch
- Pre-release Testing: Code is thoroughly tested in preparation for release
- Release Preparation: Changelog is updated and version is bumped
- Publishing: Packages are published to npm and a GitHub release is created
Since our changelog is exclusively generated from merged Pull Requests, it's important that all changes are submitted through PRs rather than direct commits to the main branch.
Pull request titles must follow the conventional commits format:
<type>(<scope>): <subject>
For example:
feat(auto-utils): add new wallet activation methodfix(auto-drive): resolve file upload timeout issuedocs: update installation instructions in README
Note: PR titles are automatically checked by our GitHub Action workflow to ensure they follow this format. Non-compliant PR titles will be flagged.
You can also use labels on PRs to help categorize changes:
featureorenhancement: New features or enhancementsbug: Bug fixesdocumentation: Documentation changesrefactor: Code refactoringperformance: Performance improvementstest: Test-related changesbuild: Build system changesci: CI configuration changeschore: Other changesstyle: Code style changesrevert: Revertsdependencies: Dependency updates
While individual commits don't directly appear in the changelog, we still follow the conventional commits format for all commits:
<type>(<scope>): <subject>
<body>
<footer>
Where <type> is one of:
- feat: A new feature
- fix: A bug fix
- docs: Documentation changes
- style: Changes that don't affect the code's behavior (formatting, etc.)
- refactor: Code changes that neither fix a bug nor add a feature
- perf: Performance improvements
- test: Adding or modifying tests
- build: Changes to the build system or dependencies
- ci: Changes to CI configuration
- chore: Other changes that don't modify src or test files
The <scope> is optional and should be the name of the affected package or component.
The changelog generator requires a GitHub Personal Access Token to fetch PR data via the GitHub API. Set this up using:
./scripts/setup-github-token.sh
Follow the instructions to create and set up a token with the repo scope.
- Ensure all changes are properly tested and merged into the main branch through Pull Requests
- Run the following command to generate the PR-based changelog with the next version:
BUMP_TYPE=patch yarn changelog # For patch release (default) BUMP_TYPE=minor yarn changelog # For minor release BUMP_TYPE=major yarn changelog # For major release - Review and edit the CHANGELOG.md file if necessary (the next version will be at the top)
- Commit the changelog
- Run the following command to create a new version (should match the bump type used above):
yarn lerna version [major|minor|patch] - Push the tags:
git push --follow-tags - Publish to npm:
yarn publish
- Go to the GitHub Actions tab in the repository
- Select the "Release" workflow
- Click "Run workflow"
- Select the release type (major, minor, patch)
- Choose whether it should be a pre-release
- Click "Run workflow"
The GitHub Action will:
- Build and test the code
- Generate the PR-based changelog with the next version at the top
- Bump the version according to the release type
- Publish the packages to npm
- Create a GitHub release with the changelog
Our changelog follows a specific format:
- The next version appears at the top of the changelog
- Each release includes grouped changes (features, bug fixes, etc.)
- Each entry links to the PR and credits the contributor
- An "Unreleased" section is maintained for future changes
The format makes it easy to see what's included in each release and who contributed to it.
After a release is made:
- Verify the npm packages are correctly published
- Check the GitHub release was created with the correct changelog
- Announce the release to users as needed
If you encounter issues during the release process:
- Check the GitHub Actions logs for any errors
- Ensure you have proper permissions for npm publishing
- Verify your Git configuration is correct
- For changelog generation issues, ensure your GITHUB_TOKEN has adequate permissions
For more assistance, contact the core development team.