-
-
Notifications
You must be signed in to change notification settings - Fork 77
63 lines (63 loc) · 1.89 KB
/
check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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@v4
with:
version: 10
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
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 "<[email protected]>"
- 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