diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..146f89b --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,27 @@ +name: publish +on: + release: + types: [published] + +jobs: + unit-tests-and-publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: setup node + uses: actions/setup-node@v2 + with: + node-version: '14' + registry-url: 'https://registry.npmjs.org' + - name: setup deno + uses: denoland/setup-deno@v1 + with: + deno-version: v1.x + - name: install dependencies + run: npm ci + - name: tests + run: npm run test + - name: publish + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}