Update Browserslist Statistics #35
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
schedule: | |
- cron: 00 16 31 * * | |
name: Update Browserslist Statistics | |
jobs: | |
stats: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '12.x' | |
- uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{secrets.SSH_PRIVATE_KEY}} | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- uses: actions/cache@v3 | |
id: yarn-cache | |
with: | |
path: | | |
node_modules | |
*/*/node_modules | |
key: ${{ matrix.node-version}}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | |
- name: Create new stats file | |
run: | | |
yarn workspace @xerox/browserslist-config run update:stats | |
npx prettier ./packages/xerox-browserslist-config/browserslist-stats.json --write | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
BAA_PRIVATE_KEY: ${{secrets.ADOBE_ANALYTICS_PRIVATE_KEY}} | |
- name: Create PR | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
commit-message: 'chore(browserslist-config): update stats' | |
title: 'chore(browserslist-config): update stats' | |
body: | | |
The `@xerox/browserslist-config` `browserslist-stats.json` file was updated with the last 3 months of Adobe Analytics data. | |
Please check the data looks reasonable and merge this PR. | |
labels: cron | |
branch: cron/stats | |
branch-suffix: timestamp | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |