This directory contains independently versioned packages for the Simpler Grants Protocol, supporting both Python and Node.js.
Versioning is managed via Changesets, using native support for Node.js and a Poetry-based workflow for Python packages.
This setup enables:
- Independent versioning of Python and Node.js packages
- Semantic version tracking via Changesets
- Automated changelog generation
- Git tagging per package
- Optional GitHub release creation from tags
lib/
├── core/ # Node package stub
│ ├── package.json
│ └── index.js
├── cli/ # Node package stub
│ ├── package.json
│ └── index.js
└── python-sdk/ # Python package
├── package.json # Required for Changesets detection
├── pyproject.toml # Python project metadata
├── CHANGELOG.md # Auto-maintained by Changesets
└── common_grants_sdk/ # SDK source code
- Versioning is handled automatically by Changesets when
pnpm changeset versionis run - Applies the following changes:
- Bumps version in
package.json - Updates or creates
CHANGELOG.md - Creates a Git tag (e.g.
core@1.0.0)
- Bumps version in
- Versioning is handled by CI using Poetry, based on
.changeset/*.mdcontent - Applies the following changes:
- Bumps version in
pyproject.toml - Bumps version in
package.json - Updates or creates
CHANGELOG.md - Creates a Git tag (e.g.
common_grants_sdk@0.3.1)
- Bumps version in
Modify the appropriate files under any lib/ package.
Run this from the root directory simpler-grants-protocol/:
pnpm changesetFollow the CLI prompts:
- Select the package(s) affected (e.g.
common_grants_sdk) - Choose version bump type (patch, minor, major)
- Provide a short summary
This will create a Markdown file in .changeset/ like:
---
"common_grants_sdk": patch
---
Fix logic bug in base class methodInclude code changes and the .changeset/*.md file in a PR.
Once the PR is merged into main, the ci-package-bump-version.yml GitHub Action will:
-
Python Packages
- Determine bump type from
.changeset/*.md - Use Poetry to bump the version and update files
- Create a Git tag (e.g.
common_grants_sdk@0.3.1)
- Determine bump type from
-
Node Packages
- Run
pnpm changeset version - Apply version and changelog updates
- Create Git tags (e.g.
core@1.0.0)
- Run
To manually generate a GitHub Release from a tag:
- Go to the Actions tab on GitHub
- Select Create GitHub Release from Tag
- Click Run workflow
- Enter or select a tag (e.g.
common_grants_sdk@0.3.1) - Click Run workflow to generate the release
After a PR is merged and the version.yml workflow runs:
-
Confirm version bump
- For Python packages: check
pyproject.tomlandpackage.jsonunderlib/python-sdk/ - For Node packages: check
package.jsonunder each affected package (e.g.lib/core/,lib/cli/)
- For Python packages: check
-
Confirm changelog
- Open the
CHANGELOG.mdfor each affected package - Example path:
lib/python-sdk/CHANGELOG.md - Ensure the top entry reflects the correct version and summary
- Open the
-
Confirm Git tag
- Go to GitHub > Code > Tags
- Verify that a tag was created for each updated package (e.g.
common_grants_sdk@0.3.1,core@1.0.0)
-
Confirm version commit
- Check the commit history for a message like
chore: bump version [skip ci]fromgithub-actions[bot]
- Check the commit history for a message like
- Python packages must include a
package.jsonfile to satisfy Changesets requirements - All version bumps are driven by the existence and content of
.changeset/*.mdfiles