From 6924e20a4430493196b33c0c260a80a55daaf34b Mon Sep 17 00:00:00 2001 From: derekpierre Date: Wed, 4 Sep 2024 16:13:46 -0400 Subject: [PATCH] Update CONTRIBUTING.md file to include steps for publishing packages to npm. --- CONTRIBUTING.md | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 540ac6640..693df9bda 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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/: +``` +- Tag the commit +```bash +git tag @ +``` + +2. Push the commits, and the tags +``` +git push orgin && git push origin shared@ && git push origin taco-auth@ && git push taco@ +``` +* NOTE: each `` 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@ devnet +npm dist-tag add @nucypher/taco@ testnet +npm dist-tag add @nucypher/taco@ mainnet +``` + +where `` is the latest version that was published.