name: otpts on: [push] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 with: node-version: '12.x' registry-url: https://registry.npmjs.org/ - name: Install dependencies run: yarn install --frozen-lockfile - name: Lint check run: yarn lint - name: Tests run: yarn test - name: Build run: yarn build env: CI: true - name: Publish if: success() && github.ref == 'refs/heads/master' run: yarn run --silent ts-node scripts/canPublish && npm publish || echo "No need to publish" env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}