Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,18 @@ jobs:
echo "base ref $GITHUB_BASE_REF"
echo "head ref $GITHUB_HEAD_REF"

- name: Build Info
- name: Configure Git
run: |
echo "node $(node --version)"
echo "npm $(npm --version)"
echo "rust $(rustup --version)"
git --version
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

- name: Configure NPM
run: |
echo "workspaces-update = false" >> .npmrc
echo "@bitgo:registry=https://registry.npmjs.org" >> .npmrc
echo "//registry.npmjs.org/:always-auth=true" >> .npmrc
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> .npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Install Packages
run: npm ci --workspaces --include-workspace-root
Expand All @@ -69,7 +69,7 @@ jobs:
run: npm --workspaces test

- name: Release
run: npx multi-semantic-release
run: npx lerna publish --yes --no-verify-access
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,39 @@ This repo is the home of BitGo's WASM libraries.
- [wasm-pack](https://rustwasm.github.io/wasm-pack/) (install with `cargo install wasm-pack`)
- [Node.js](https://nodejs.org/en/)

# Package Management

This monorepo uses [Lerna](https://lerna.js.org/) for managing package versions and publishing to npm.

## Versioning

Packages use **independent versioning** with [Conventional Commits](https://www.conventionalcommits.org/) to automatically determine version bumps:

- `fix:` commits trigger patch releases (0.0.x)
- `feat:` commits trigger minor releases (0.x.0)
- `BREAKING CHANGE:` in commit body triggers major releases (x.0.0)

## Publishing

Publishing is automated via GitHub Actions when changes are pushed to `master` or `beta` branches. The workflow:

1. Builds all packages
2. Runs tests
3. Uses Lerna to analyze commits since last release
4. Automatically versions and publishes changed packages

To manually publish (if needed):

```bash
npx lerna publish
```

To see what would be published without actually publishing:

```bash
npx lerna changed
```

# Packages


Expand Down
23 changes: 23 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "independent",
"npmClient": "npm",
"useWorkspaces": true,
"command": {
"publish": {
"conventionalCommits": true,
"message": "chore(release): publish",
"ignoreChanges": [
"**/*.md",
"**/*.test.ts",
"**/*.test.js",
"**/test/**"
]
},
"version": {
"conventionalCommits": true,
"message": "chore(release): version packages"
}
}
}

Loading