-
Notifications
You must be signed in to change notification settings - Fork 46
82 lines (68 loc) · 2.28 KB
/
build.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Update spec info
on:
schedule:
- cron: '10 */6 * * *'
workflow_dispatch:
jobs:
fetch:
runs-on: ubuntu-latest
steps:
# Starting with Ubuntu 23+, a security feature prevents running Puppeteer
# by default. It needs to be disabled. Using the "easiest" option, see:
# https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md
# https://github.com/puppeteer/puppeteer/pull/13196/files
- name: Disable AppArmor
run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
- name: Checkout repo
uses: actions/checkout@v4
with:
# Need to checkout all history as job also needs to access the
# xxx-specs@latest branches
fetch-depth: 0
- name: Setup node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Setup environment
run: npm ci
- name: Build new index file
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run build
- name: Test new index file
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm run test-index
- name: Bump minor version of packages if needed
run: node src/bump-packages-minor.js
- name: Commit updates
run: |
git config user.name "fetch-info bot"
git config user.email "<>"
git commit -m "[data] Update spec info" -a || true
- name: Push changes
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main
- name: Prepare packages data
run: node src/prepare-packages.js
- name: Create/Update pre-release PR for web-specs
run: node src/prepare-release.js web-specs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create/Update pre-release PR for browser-specs
run: node src/prepare-release.js browser-specs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Following step runs even if a previous step failed to upload intermediary
# build files
- name: Store intermediary steps as artifacts
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: buildsteps
path: |
.buildsteps