Skip to content

Commit

Permalink
README.md changes for the publish instructions (#46)
Browse files Browse the repository at this point in the history
* README.md changes for the publish instructions

* Correct npm-publish-dev workflow

* Correct npm-publish-dev workflow
  • Loading branch information
chrisli30 authored Aug 22, 2023
1 parent 62b05d4 commit cc757eb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/npm-publish-dev.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Publish dev version

on:
workflow_run:
workflows: ["Publish dev version"]
types:
- manual
workflow_dispatch:
inputs:
trigger-manual:
description: 'Manually trigger the workflow'

jobs:
publish-dev-version:
Expand All @@ -29,7 +29,7 @@ jobs:
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTOMATION_TOKEN_CHRIS }}" > ~/.npmrc

- name: Publish packages to NPM with dev tag
run: |
run: |
for dir in packages/*; do
if [ -d "$dir" ]; then
echo "Publishing $dir package"
Expand All @@ -38,4 +38,3 @@ jobs:
cd ..
fi
done
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ The build command will generate distribution files under `packages/api-augment/b

## Publishing the Packages
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.
1. In order to trigger a version update, you need to run `npm run changeset` locally to generate a mark file. 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 by that mark file to create a PR to update all package versions automatically, as seen in this PR, https://github.com/OAK-Foundation/oak.js/pull/42. If you need to stack more changes on to the same version, just re-run step 1 to create another mark file and merge it to the main branch.
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`.

Expand Down

0 comments on commit cc757eb

Please sign in to comment.