From b149e399e87d297cd388434363426f2553504b96 Mon Sep 17 00:00:00 2001 From: chrisli30 Date: Mon, 21 Aug 2023 23:12:02 -0700 Subject: [PATCH] Update README.md about publish --- .github/workflows/npm-publish-dev.yml | 7 +++++-- README.md | 15 +++++---------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/npm-publish-dev.yml b/.github/workflows/npm-publish-dev.yml index 12c7c23..bb090cd 100644 --- a/.github/workflows/npm-publish-dev.yml +++ b/.github/workflows/npm-publish-dev.yml @@ -1,10 +1,13 @@ name: Publish dev version on: - workflow_dispatch + workflow_run: + workflows: ["Publish dev version"] + types: + - manual jobs: - publish-dev-versions: + publish-dev-version: runs-on: ubuntu-latest steps: - name: 🤘 checkout diff --git a/README.md b/README.md index 2124b01..dfe6578 100644 --- a/README.md +++ b/README.md @@ -98,15 +98,10 @@ npm run build The build command will generate distribution files under `packages/api-augment/build`. ## Publishing the Packages -Note: Only the @oak-network developer team on [npmjs.com](https://www.npmjs.com/) has the rights to publish new versions. - -Run the following command to publish the packages: - -```bash -npm run publish -- <2fa_code> -``` - -- The first parameter, ``, should match the OAK-blockchain code version. If the version string is like `1.9.0-rc.1`, it will be tagged with `rc` when uploaded to npm. -- The second parameter, `<2fa_code>`, is the Two-Factor Authenticator code of your npmjs.com account, which is enforced when joining the @oak-network team. +The release creation and publish is completely handled by Github Actions. +1. In order to trigger a version update, you need to run `npm run changeset` locally to generate a new version number and a Release Changelog. The script will create a .md file under .changeset like this PR, https://github.com/OAK-Foundation/oak.js/commit/c35050eb16bb73251fb05dd9010ab577f2adf5d6. +2. Once the above PR is merged to main, an Action will be triggered to update all package versions automatically, as seen in this PR, https://github.com/OAK-Foundation/oak.js/pull/42. +3. If things look good, merge the above PR created by changeset, and run the **Publish dev version** workflow manually to publish an NPM package version with `dev` tag for testing. +4. If testing goes well, run the **Make dev version latest** workflow manually to update the npm tag of `dev` to `latest`. You should receive an email from `support@npmjs.com` if the package is successfully published.