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
61 changes: 52 additions & 9 deletions PUBLISHING.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,88 @@
After PR is merged:
# Publishing

1. Switch to latest `master`:
Publish the SDK before the wagmi connector. The connector has an exact peer dependency on the SDK
version, so the SDK package must exist in the npm registry first.

Do not use a recursive workspace publish while the connector's peer dependency is intentionally
lockstep with the SDK version. Publish each package explicitly, in order.

## Before Merging The Release PR

Before publishing a new alpha version, update these values to the same exact version:

- `package.json` `version`
- `packages/oms-wallet-wagmi-connector/package.json` `version`
- `packages/oms-wallet-wagmi-connector/package.json` `peerDependencies["@0xsequence/typescript-sdk"]`

## After The Release PR Is Merged

1. Switch to the latest `master`:

```bash
git checkout master
git pull
pnpm install --frozen-lockfile
```

2. Run release checks:
2. Capture the release version and verify package versions:

```bash
VERSION=$(node -p "require('./package.json').version")
pnpm check:package-versions
```

3. Run release checks:

```bash
pnpm exec tsc --noEmit
pnpm test
pnpm build
pnpm build:node-example
pnpm build:example
pnpm build:trails-actions-example
pnpm --filter @0xsequence/oms-wallet-wagmi-connector test
pnpm --filter @0xsequence/oms-wallet-wagmi-connector build
pnpm build:wagmi-example
```

4. Dry-run the SDK publish:

```bash
pnpm publish --dry-run --no-git-checks --tag alpha --access public
```

3. Dry-run publish:
5. Dry-run the wagmi connector publish:

```bash
pnpm publish --dry-run --no-git-checks
pnpm --filter @0xsequence/oms-wallet-wagmi-connector publish --dry-run --no-git-checks --tag alpha --access public
```

4. Log in to npm if needed:
6. Log in to npm if needed:

```bash
pnpm npm login
pnpm npm whoami
```

5. Publish alpha:
7. Publish the SDK:

```bash
pnpm publish --tag alpha --access public
pnpm view @0xsequence/typescript-sdk@$VERSION version
```

8. Publish the wagmi connector:

```bash
pnpm --filter @0xsequence/oms-wallet-wagmi-connector publish --tag alpha --access public
pnpm view @0xsequence/oms-wallet-wagmi-connector@$VERSION version
```

6. Verify package:
9. Verify the alpha dist tags:

```bash
pnpm view @0xsequence/typescript-sdk@alpha version
pnpm view @0xsequence/oms-wallet-wagmi-connector@alpha version
```

Optional: create a git tag / GitHub release for `v0.1.0-alpha.0`.
Optional: create a git tag and GitHub release for `v$VERSION`.
33 changes: 1 addition & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -527,38 +527,7 @@ See [API.md](./API.md) for the full method and type reference.

## Publishing

Publish the SDK before the wagmi connector. The connector has an exact peer dependency on the SDK
version, so the SDK package must exist in the npm registry first.

Before publishing a new alpha version, update these values to the same exact version:

- `package.json` `version`
- `packages/oms-wallet-wagmi-connector/package.json` `version`
- `packages/oms-wallet-wagmi-connector/package.json` `peerDependencies["@0xsequence/typescript-sdk"]`

Then publish from the repository root with the alpha dist tag:

```bash
npm whoami

VERSION=$(node -p "require('./package.json').version")

pnpm install --frozen-lockfile
pnpm check:package-versions
pnpm exec tsc --noEmit
pnpm test
pnpm --filter @0xsequence/oms-wallet-wagmi-connector test
pnpm --filter @0xsequence/oms-wallet-wagmi-connector build

pnpm publish --access public --tag alpha
npm view @0xsequence/typescript-sdk@$VERSION version

pnpm --filter @0xsequence/oms-wallet-wagmi-connector publish --access public --tag alpha
npm view @0xsequence/oms-wallet-wagmi-connector@$VERSION version
```

Do not use a recursive workspace publish for these packages while the connector's peer dependency is
intentionally lockstep with the SDK version. The publish order matters.
See [PUBLISHING.md](./PUBLISHING.md) for release and npm publishing steps.

## Contributing

Expand Down
Loading