Skip to content

Check

Check #25305

Workflow file for this run

name: Check
on:
push:
branches:
- main
schedule:
- cron: '41 * * * *'
permissions:
contents: write
jobs:
publish:
name: Check
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
scope: caniuse-lite
- name: Check caniuse-db version
id: caniuse
run: node ./check.js
- name: Check @mdn/browser-compat-data version
if: steps.caniuse.outputs.newVersion
run: node ./check-mdn-bcd.js
- name: Setup git config
if: steps.caniuse.outputs.newVersion
run: |
git config user.name "Auto-Updater"
git config user.email "<andrey+caniuse@sitnik.ru>"
- name: Install dependencies
if: steps.caniuse.outputs.newVersion
run: pnpm install --no-frozen-lockfile --ignore-scripts
- name: Copy MDN data
if: steps.caniuse.outputs.newVersion
run: node ./copy-mdn.js
- name: Pack Can I Use data
if: steps.caniuse.outputs.newVersion
run: pnpm run pack
- name: Run tests
if: steps.caniuse.outputs.newVersion
run: pnpm test:unit
- name: Commit changes
if: steps.caniuse.outputs.newVersion
run: node ./commit.js
- name: Publish
if: steps.caniuse.outputs.newVersion
run: ./node_modules/.bin/clean-publish &> publish.log
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
- name: Check npm log
if: steps.caniuse.outputs.newVersion
run: node ./log.js
- name: Push changes
if: steps.caniuse.outputs.newVersion
run: git push --follow-tags