-
Notifications
You must be signed in to change notification settings - Fork 23
45 lines (43 loc) · 1.21 KB
/
plugin-updater.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
name: Plugin Updater
on:
workflow_dispatch:
push:
branches:
- main
paths:
- webcomponents/**.js
- webcomponents/**.ts
- webcomponents/**.json
- webcomponents/**.svelte
- "!webcomponents/dist/**"
jobs:
build-webcomponents:
name: Build web components
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.UPDATER }}
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Get version
id: version
run: |
version=$(jq -r .version webcomponents/package.json)
echo "version=$version" >> $GITHUB_OUTPUT
- name: Build
run: |
cd webcomponents
npm install
npm run build
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add dist
git commit -m "Update web components build artifact"
- name: Put new build into the repo
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.UPDATER }}
branch: ${{ github.ref }}