Skip to content

Commit b17aeef

Browse files
committed
[CI/CD] foreach
1 parent 1610547 commit b17aeef

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

.github/workflows/node.js.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,15 @@ jobs:
4242
yarn workspaces foreach --all version patch
4343
git push --follow-tags
4444
45-
# - name: Setup .npmrc for authentication
46-
# run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
47-
- name: Enable Debug Mode
48-
run: echo "ACTIONS_STEP_DEBUG=true" >> $GITHUB_ENV
49-
- name: Publish to npm (only on main branch)
50-
if: github.ref == 'refs/heads/main'
51-
# run: yarn workspaces foreach --all --topological --no-private npm publish --access public
52-
run: cd ./packages/main && npm publish --access public
53-
env:
54-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
45+
- name: Create .npmrc file
46+
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
47+
48+
- name: Publish to npm using yarn workspaces
49+
if: github.ref == 'refs/heads/main'
50+
run: yarn workspaces foreach --all --topological --no-private npm publish --access public
51+
52+
# - name: Publish to npm (only on main branch)
53+
# if: github.ref == 'refs/heads/main'
54+
# run: cd ./packages/main && npm publish --access public
55+
# env:
56+
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)