Skip to content

Commit

Permalink
Merge pull request #22 from editor-js/fix-workflow
Browse files Browse the repository at this point in the history
add .npmrc for each directory
  • Loading branch information
e11sy authored Aug 20, 2024
2 parents 99a76f0 + 6129000 commit 93370f2
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 93370f2

Please sign in to comment.