Skip to content

Bump @typescript-eslint/eslint-plugin from 7.18.0 to 8.12.2 #111

Bump @typescript-eslint/eslint-plugin from 7.18.0 to 8.12.2

Bump @typescript-eslint/eslint-plugin from 7.18.0 to 8.12.2 #111

name: On pull request
on:
pull_request:
branches:
- main
permissions: write-all
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 20.x
steps:
- name: Checkouting code...
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: NPM install
run: npm install
- name: NPM test
run: npm run test
build:
runs-on: ubuntu-latest
needs: test
strategy:
matrix:
node-version:
- 20.x
steps:
- name: Checkouting code...
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: NPM install
run: npm install
- name: NPM build
run: npm run build
- name: NPM format
run: npm run format
- name: NPM format check
run: npm run format-check
- name: Lint
run: npm run lint
- name: Pack
run: npm run pack
- name: Uploading build artifact...
uses: actions/upload-artifact@v4
with:
name: build
path: dist/*.js
commit_and_push:
runs-on: ubuntu-latest
name: Commit and push build if needed
needs: build
steps:
- name: Checkouting code...
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Downloading build artifact....
uses: actions/download-artifact@v4
with:
name: build
path: dist/
- name: Auto commiting changes...
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Automatically builded and updated
file_pattern: dist/*.js
skip_fetch: true
skip_checkout: true
dependabot:
needs:
- build
- commit_and_push
permissions:
pull-requests: write
contents: write
runs-on: ubuntu-latest
# Checking the actor will prevent your Action run failing on non-Dependabot
# PRs but also ensures that it only does work for Dependabot PRs.
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
# This first step will fail if there's no metadata and so the approval
# will not occur.
- name: Dependabot metadata
id: dependabot-metadata
uses: dependabot/fetch-metadata@v2.2.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
# Here the PR gets approved.
- name: Approve a PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Finally, this sets the PR to allow auto-merging for patch and minor
# updates if all checks pass
- name: Enable auto-merge for Dependabot PRs
# if: ${{ steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major' }}
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}