diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..7a74a66 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,48 @@ +name: Release + +on: + workflow_dispatch: + inputs: + version: + description: 'Version bump (patch, minor, major)' + required: true + default: 'patch' + type: choice + options: + - patch + - minor + - major + +jobs: + release: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ secrets.GITHUB_TOKEN }} + + - uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - run: npm ci + + - name: Configure Git + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + + - name: Bump version and generate changelog + run: | + npx standard-version --release-as ${{ inputs.version }} --signoff + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Push release + run: | + git push --follow-tags origin master diff --git a/.versionrc b/.versionrc new file mode 100644 index 0000000..35072db --- /dev/null +++ b/.versionrc @@ -0,0 +1,22 @@ +{ + "types": [ + {"type": "feat", "section": "Features"}, + {"type": "fix", "section": "Bug Fixes"}, + {"type": "docs", "section": "Documentation"}, + {"type": "style", "section": "Styling", "hidden": true}, + {"type": "refactor", "section": "Refactoring"}, + {"type": "perf", "section": "Performance"}, + {"type": "test", "section": "Tests"}, + {"type": "build", "section": "Build System"}, + {"type": "ci", "section": "CI/CD"}, + {"type": "chore", "section": "Chores", "hidden": true}, + {"type": "revert", "section": "Reverts"} + ], + "releaseCommitMessageFormat": "chore(release): {{currentTag}}", + "skip": { + "bump": false, + "changelog": false, + "commit": false, + "tag": false + } +} diff --git a/docs/RELEASE.md b/docs/RELEASE.md new file mode 100644 index 0000000..290d731 --- /dev/null +++ b/docs/RELEASE.md @@ -0,0 +1,51 @@ +# Release Process + +This document describes how to cut a new release of StellarMind. + +## Versioning Policy + +StellarMind follows [Semantic Versioning](https://semver.org/) (SemVer): + +- **MAJOR** (`X.0.0`) — breaking changes to the API or payment flow +- **MINOR** (`0.X.0`) — new features, backward-compatible +- **PATCH** (`0.0.X`) — bug fixes, documentation, non-functional changes + +## Automated Release + +Releases are automated via GitHub Actions: + +1. Go to the [Actions tab](../../actions/workflows/release.yml) +2. Click **"Run workflow"** +3. Select the version bump: `patch`, `minor`, or `major` +4. The workflow will: + - Bump version in `package.json` + - Generate/update `CHANGELOG.md` from conventional commits + - Create a git tag + - Push the release commit and tag + +## Manual Release (fallback) + +```bash +# Ensure on latest master with clean tree +git checkout master +git pull origin master + +# Generate changelog and bump version +npx standard-version --release-as patch + +# Push release commit and tag +git push --follow-tags origin master +``` + +## Commit Convention + +We use [Conventional Commits](https://www.conventionalcommits.org/): + +``` +feat: add new agent capability +fix: correct payment verification edge case +docs: update architecture diagram +refactor: extract x402 client into shared module +``` + +The changelog is auto-generated from these commit prefixes.