--- on: push: branches: - master name: Build and Publish jobs: build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 - name: Setup env uses: actions/setup-node@v1 with: node-version: 12 - run: yarn name: Install dependencies - name: ESLint checks run: yarn lint - run: yarn build name: Compile Typescript - run: yarn test name: Run tests publish-npm: needs: build runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: node-version: 12 registry-url: https://registry.npmjs.org/ - run: yarn - run: yarn publish --non-interactive env: NODE_AUTH_TOKEN: ${{secrets.npm_token}} publish-gpr: needs: build runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: node-version: 12 registry-url: https://npm.pkg.github.com/ scope: '@butlerx' - run: yarn - run: yarn publish --non-interactive env: NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}