This file contains hidden or 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
# If it's a pull request, don't build the plugin, just fail if it can't be built | |
# If it's a push to main, build the plugin | |
name: plugin-build | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v5 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
- name: Use Node.js | |
uses: actions/setup-node@v5 | |
with: | |
node-version: 22.x | |
- name: Install dependencies | |
working-directory: ./resources/electron/ | |
run: npm install | |
- name: Build plugin | |
working-directory: ./resources/electron/ | |
run: npm run plugin:build | |
- name: Commit changes | |
if: github.event_name == 'pull_request' | |
uses: stefanzweifel/git-auto-commit-action@v6 | |
with: | |
commit_message: Build plugin | |
- name: Create Pull Request | |
if: github.event_name != 'pull_request' | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
commit-message: Build plugin | |
title: 'Auto: Build plugin assets' | |
body: | | |
This PR contains the latest built plugin assets. | |
**Build Details:** | |
- Triggered by: ${{ github.actor }} | |
- From commit: [${{ github.sha }}](${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}) | |
- Workflow run: [View Run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) | |
Automatically generated by the plugin-build workflow. | |
branch: build-plugin-update | |
base: main | |
delete-branch: true |