diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs-ci.yml similarity index 100% rename from .github/workflows/nodejs.yml rename to .github/workflows/nodejs-ci.yml diff --git a/.github/workflows/nodejs-publish.yml b/.github/workflows/nodejs-publish.yml new file mode 100644 index 0000000..8b551bb --- /dev/null +++ b/.github/workflows/nodejs-publish.yml @@ -0,0 +1,21 @@ +name: Node.js Publish + +on: + release: + types: [published] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Use Node.js 12 + uses: actions/setup-node@v1 + with: + node-version: 12 + - run: npm install + - run: npm run build --if-present + - run: npm test + - run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_SECRET}} \ No newline at end of file