name: publish-and-tag env: CI: true on: push: branches: - beta jobs: publish-to-npm: runs-on: ubuntu-latest steps: - name: checkout uses: actions/checkout@v2 - name: setup Node uses: actions/setup-node@v2 with: node-version: 14.x registry-url: 'https://registry.npmjs.org' - name: install run: npm install - name: test run: npm test # Publish to npm if this version is not published - name: publish run: npm run publish:beta env: NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}