From 411b1280c9851503d72e54e2e2a27685614ff7df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?22388o=E2=9A=A1=EF=B8=8F?= <83122757+22388o@users.noreply.github.com> Date: Fri, 28 Jun 2024 09:29:20 -0300 Subject: [PATCH] Update npm-publish.yml --- .github/workflows/npm-publish.yml | 41 +++++++++++++------------------ 1 file changed, 17 insertions(+), 24 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 21841bf9..d9900c59 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -1,34 +1,27 @@ -# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created -# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages - -name: Node.js Package - +name: Publish to NPM on: release: types: [created] - jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 20 - - run: npm bitcoinjs-lib - - run: npm lightning - - run: npm test + - name: Checkout + uses: actions/checkout@v4 - publish-npm: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - name: Setup Node + uses: actions/setup-node@v4 with: - node-version: 16 - registry-url: https://registry.npmjs.org/ - - run: npm ci - - run: npm publish + node-version: '20' + registry-url: 'https://registry.npmjs.org' + + - name: Install dependencies 🔧 + run: npm install + + - name: Publish package on NPM 📦 + run: npm publish env: - NODE_AUTH_TOKEN: ${{secrets.npm_token}} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + +env: + ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true