diff --git a/.github/workflows/npm-publish-dev.yml b/.github/workflows/npm-publish-dev.yml index a22bc16..e599df5 100644 --- a/.github/workflows/npm-publish-dev.yml +++ b/.github/workflows/npm-publish-dev.yml @@ -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: @@ -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" @@ -38,4 +38,3 @@ jobs: cd .. fi done - diff --git a/README.md b/README.md index dfe6578..d72b90a 100644 --- a/README.md +++ b/README.md @@ -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`.