Skip to content

Update web components build artifact #1061

Update web components build artifact

Update web components build artifact #1061

name: Plugin Updater
on:
workflow_dispatch:
push:
branches:
- main
paths:
- webcomponents/**.js
- webcomponents/**.ts
- webcomponents/**.json
- webcomponents/**.svelte
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 }}