Skip to content

Commit

Permalink
test publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
nikmel2803 committed Aug 20, 2024
1 parent 93370f2 commit e8b1c76
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,28 @@ jobs:

- 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
cat <<EOF > .npmrc
//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
registry=https://registry.npmjs.org/
always-auth=true
EOF
yarn publish:ci
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

# - 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 }}

notify:
needs: publish
runs-on: ubuntu-latest
Expand Down

0 comments on commit e8b1c76

Please sign in to comment.