diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f5c8e73..920d714 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,9 +18,6 @@ jobs: - name: Install deps and build (with cache) uses: bahmutov/npm-install@v1 - - name: Lint - run: yarn lint - - name: Test run: yarn test --ci --coverage --maxWorkers=2 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..1299ede --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,35 @@ +name: NPM Publish + +on: + release: + types: [created] + +jobs: + build: + name: Build and publish to NPM + + runs-on: ubuntu-latest + + steps: + - name: Checkout repo + uses: actions/checkout@v2 + + - name: Use Node 12 + uses: actions/setup-node@v1 + with: + node-version: "12.x" + registry-url: "https://registry.npmjs.org" + + - name: Install deps + run: yarn install + + - name: Test + run: yarn test --ci --coverage --maxWorkers=2 + + - name: Build + run: yarn build + + - name: Publish + run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}