a #1066
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Plugin Updater | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
# - main | |
- fix_plugin_updater | |
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 diff --exit-code | |
echo $? | |
if [ $? -eq 1 ]; then | |
echo 'DIFF FOUND' | |
else | |
echo $'\nNo new updates' | |
fi | |
pwd | |
ls dist | |
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" | |
git push | |
# - name: Put new build into the repo | |
# uses: ad-m/github-push-action@master | |
# with: | |
# github_token: ${{ secrets.UPDATER }} | |
# branch: ${{ github.ref }} |