diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 1bae8dea..2aca510c 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,14 +1,13 @@ -name: publish CI +name: Publish NPM Package on: - push: - tags: - - '**' + release: + types: [published] jobs: - build: - runs-on: windows-latest + publish-npm: + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -18,8 +17,9 @@ jobs: registry-url: https://registry.npmjs.org/ - run: npm install - run: npm run build --if-present - - run: npm publish --tag beta - env: - NODE_AUTH_TOKEN: ${{secrets.npm_token}} + - run: npm run test + - run: npm publish --tag beta --access public + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}}