Skip to content

Commit

Permalink
Document steps for publishing packages to npm (#579)
Browse files Browse the repository at this point in the history
  • Loading branch information
theref authored Sep 5, 2024
2 parents 58a14c3 + 6924e20 commit 43bc968
Showing 1 changed file with 44 additions and 1 deletion.
45 changes: 44 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,47 @@ pnpm doc:publish

## Publishing

TODO: Update after implementing automated publishing.
1. Update version and create tags

For each package in the following order: `shared`, `taco-auth`, `taco`, do the following:
- Update the `version` value in corresponding `package.json`
- Commit the change using the following commit message:
```
chore(release): release @nucypher/<package>:<new_version>
```
- Tag the commit
```bash
git tag <package>@<version>
```

2. Push the commits, and the tags
```
git push orgin <branch> && git push origin shared@<new_version> && git push origin taco-auth@<new_version> && git push taco@<new_version>
```
* NOTE: each `<new_version>` may be a different value

3. Publish `@nucypher/shared`, `@nucypher/taco-auth` and `@nucypher/taco` packages to npm.

Perform a dry run to observe the eventual outcome without actually publishing
```bash
pnpm publish -r --filter '!@nucypher/pre' --dry-run
```

If the outcome looks good then re-run the command without the `--dry-run` parameter
```bash
pnpm publish -r --filter '!@nucypher/pre'
```

View resulting published versions:
- [@nucypher/shared](https://www.npmjs.com/package/@nucypher/shared?activeTab=versions)
- [@nucypher/taco-auth](https://www.npmjs.com/package/@nucypher/taco-auth?activeTab=versions)
- [@nucypher/taco](https://www.npmjs.com/package/@nucypher/taco?activeTab=versions)

4. Tag latest release of `@nucypher/taco` for various domains where appropriate:
```bash
npm dist-tag add @nucypher/taco@<new_version> devnet
npm dist-tag add @nucypher/taco@<new_version> testnet
npm dist-tag add @nucypher/taco@<new_version> mainnet
```

where `<new_version>` is the latest version that was published.

0 comments on commit 43bc968

Please sign in to comment.