From 16f33a64bcef670faaf1ca1c0007069e1f8d5448 Mon Sep 17 00:00:00 2001 From: Sam Wray Date: Sat, 12 Nov 2022 17:11:01 +0000 Subject: [PATCH] feat: add automation of browserslist update (#787) * feat: add automation of browserslist update fixes #691 * fix: use electron instead of chrome --- .browserslistrc | 2 +- .github/workflows/browserslist.yml | 32 ++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/browserslist.yml diff --git a/.browserslistrc b/.browserslistrc index c003912dd..552eaf845 100644 --- a/.browserslistrc +++ b/.browserslistrc @@ -1 +1 @@ -last 1 Chrome version \ No newline at end of file +electron >= 11.2.0 diff --git a/.github/workflows/browserslist.yml b/.github/workflows/browserslist.yml new file mode 100644 index 000000000..31afc8182 --- /dev/null +++ b/.github/workflows/browserslist.yml @@ -0,0 +1,32 @@ +name: Update Browserslist database + +on: + schedule: + - cron: '0 2 1,15 * *' + +permissions: + contents: write + pull-requests: write + +jobs: + update-browserslist-database: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Configure git + run: | + git config --global user.email "action@github.com" + git config --global user.name "GitHub Action" + - name: Update Browserslist database and create PR if applies + uses: c2corg/browserslist-update-action@v2 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: browserslist-update + base_branch: next + commit_message: 'build: update Browserslist db' + title: 'build: update Browserslist db' + body: Auto-generated by [browserslist-update-action](https://github.com/c2corg/browserslist-update-action/) + labels: 'chores, github action'