diff --git a/.github/workflows/setup-node.yml b/.github/workflows/setup-node.yml index fa836e7..61ecd65 100644 --- a/.github/workflows/setup-node.yml +++ b/.github/workflows/setup-node.yml @@ -1,12 +1,17 @@ -name: Setup Node.js environment -- uses: actions/setup-node@v2.5.1 -steps: -- uses: actions/checkout@v2 -- uses: actions/setup-node@v2 - with: - node-version: '14.x' - registry-url: 'https://registry.npmjs.org' -- run: npm install -- run: npm publish - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file +name: Publish Package to npmjs +on: + release: + types: [created] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: '14.x' + registry-url: 'https://registry.npmjs.org' + - run: npm install + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}