-
Notifications
You must be signed in to change notification settings - Fork 159
54 lines (45 loc) · 1.36 KB
/
build-extension.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
name: Build Extension
on:
push:
branches:
- main
paths:
- 'packages/extension/**'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
version: 9.x
- name: Install dependencies
run: pnpm install
- name: Get package info
id: package
run: |
echo "name=$(node -p "require('./packages/extension/package.json').name")" >> $GITHUB_OUTPUT
echo "version=$(node -p "require('./packages/extension/package.json').version")" >> $GITHUB_OUTPUT
- name: Build extensions
run: |
pnpm build
cd packages/extension
pnpm pack:all
- name: Commit changes
if: github.ref == 'refs/heads/main'
run: |
git checkout main
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add -f packages/extension/build/*.zip
git diff --staged --quiet || (git commit -m "chore: update extension builds [skip ci]" && git push)