1 |
name: Build Extensions |
2 |
|
3 |
on: |
4 |
push: |
5 |
branches: [main] |
6 |
# schedule: |
7 |
# - cron: '*/20 * * * *' |
8 |
|
9 |
jobs: |
10 |
build: |
11 |
runs-on: ubuntu-latest |
12 |
if: github.event_name != 'push' || ( startsWith(github.event.head_commit.message, 'chore(extensions') || startsWith(github.event.head_commit.message, 'build(extensions') ) |
13 |
|
14 |
steps: |
15 |
- uses: actions/checkout@v3 |
16 |
with: |
17 |
submodules: "true" |
18 |
|
19 |
- name: Use Node.js 21.x |
20 |
uses: actions/setup-node@v3 |
21 |
with: |
22 |
node-version: 21.x |
23 |
|
24 |
- name: Install Tools |
25 |
run: | |
26 |
sudo apt-get update; |
27 |
sudo apt-get install -y jq libarchive-dev; |
28 |
cd /tmp; |
29 |
git clone https://github.com/wahern/tarsum --depth=1; |
30 |
cd tarsum; |
31 |
make; |
32 |
sudo cp tarsum /usr/bin/tarsum; |
33 |
rm -fr /tmp/tarsum; |
34 |
|
35 |
- name: Install Main Dependencies |
36 |
run: npm install -D |
37 |
|
38 |
- name: Build Main Project |
39 |
run: npm run build |
40 |
|
41 |
- name: Build Extensions |
42 |
run: | |
43 |
cd extensions; |
44 |
bash ../scripts/build-extensions.sh; |
45 |
|
46 |
- name: Build Index |
47 |
run: node scripts/extensions.js --mkindex |
48 |
|
49 |
- name: Commit and Push Changes |
50 |
run: | |
51 |
git config --global user.email "[email protected]" |
52 |
git config --global user.name "Ar Rakin" |
53 |
git add . |
54 |
git commit -m "chore(extensions): build extensions [skip ci]" |
55 |
git pull origin main |
56 |
git push origin HEAD:main |