Skip to content

Commit

Permalink
add .npmrc for each directory
Browse files Browse the repository at this point in the history
  • Loading branch information
e11sy committed Aug 20, 2024
1 parent a91c873 commit d5d018a
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,19 @@ jobs:
node-version: 22.1.0
registry-url: 'https://registry.npmjs.org/'

- name: Create .npmrc
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc

- name: Install dependencies
run: yarn install

- name: Publish all packages
run: yarn publish:ci
- name: Create .npmrc and publish packages
run: |
# Create .npmrc file in each package directory
for dir in packages/*; do
if [ -d "$dir" ]; then
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > "$dir/.npmrc"
fi
done
# Run the publish script
yarn publish:ci
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

Expand Down

0 comments on commit d5d018a

Please sign in to comment.