-
-
Notifications
You must be signed in to change notification settings - Fork 29
62 lines (50 loc) · 1.78 KB
/
build-plugin.yml
File metadata and controls
62 lines (50 loc) · 1.78 KB
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
55
56
57
58
59
60
61
62
# 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@v6
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@v7
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