diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5d555ded..0acbd573 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: - node-version: [14.x, 16.x, 18.x] + node-version: [16.x, 18.x] steps: - uses: actions/checkout@v3 @@ -22,5 +22,18 @@ jobs: with: node-version: ${{ matrix.node-version }} cache: 'npm' - - run: npm run build - - run: npm run lint + + - name: yarn install + uses: borales/actions-yarn@v4 + with: + cmd: install + + - name: yarn build + uses: borales/actions-yarn@v4 + with: + cmd: build + + - name: yarn lint + uses: borales/actions-yarn@v4 + with: + cmd: lint diff --git a/.github/workflows/pr-npm-publish.yml b/.github/workflows/pr-npm-publish.yml index 51bd9e21..bd955769 100644 --- a/.github/workflows/pr-npm-publish.yml +++ b/.github/workflows/pr-npm-publish.yml @@ -9,24 +9,34 @@ on: jobs: build: + if: github.event.pull_request.merged == true runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 16 - - run: npm build - - run: npm lint + node-version: 18 + - name: yarn install + uses: borales/actions-yarn@v4 + with: + cmd: install + - name: yarn build + uses: borales/actions-yarn@v4 + with: + cmd: build + - name: yarn lint + uses: borales/actions-yarn@v4 + with: + cmd: lint bump-version: needs: build - if: github.event.pull_request.merged == true runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 - name: Apply version bump (major) if: contains(github.event.pull_request.labels.*.name, 'major') run: npm version major @@ -49,7 +59,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 registry-url: https://registry.npmjs.org/ - run: npm publish env: