Skip to content

Commit

Permalink
Update README.md about publish
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisli30 committed Aug 22, 2023
1 parent c35050e commit b149e39
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/npm-publish-dev.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
15 changes: 5 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 -- <publish_version> <2fa_code>
```

- The first parameter, `<publish_version>`, 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.

0 comments on commit b149e39

Please sign in to comment.