diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 3f36154..101d670 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -11,18 +11,21 @@ jobs: matrix: node-version: [10.x] steps: - - uses: actions/checkout@v1 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: npm install, build, and test - run: | - npm install - npm run build --if-present - # npm test - - name: npm publish - run: | - NPM_TOKEN=${{ secrets.NPM_TOKEN }} npm publish - env: - CI: true + - uses: actions/checkout@v1 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: npm install, build, and test + run: | + npm install + npm run build --if-present + # npm test + - name: Authenticate with NPM + run: | + echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc + - name: npm publish + run: | + npm publish + env: + CI: true