Skip to content

test: read .npmrc

test: read .npmrc #19

Workflow file for this run

name: Publish Package to npmjs
on:
push:
branches: [ci-testing]
release:
types: [published]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
scope: '@layerzerolabs'
- run: cat .npmrc
- uses: pnpm/action-setup@v2
with:
version: 8
- run: pnpm install
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: pnpm test
- name: npm publish
run: |
if [ "${{ github.event_name }}" = "release" ] && [ "${{ github.event.action }}" = "published" ]; then
npm publish --access=restricted
else
npm publish --access=restricted --dry-run
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}