update jetbrains ci to build gui

This commit is contained in:
Nate Sesti 2024-07-15 11:17:46 -07:00
parent af19632bbd
commit 3d4b0e77e4
2 changed files with 25 additions and 7 deletions

View file

@ -16,7 +16,7 @@ name: Build
on:
# Trigger the workflow on pushes to only the 'main' branch (this avoids duplicate checks being run e.g., for dependabot pull requests)
push:
branches: [main]
branches: [main, preview]
# Trigger the workflow on any pull request
# pull_request:

View file

@ -87,6 +87,12 @@ jobs:
path: binary/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('binary/package-lock.json') }}
- name: Cache gui node_modules
uses: actions/cache@v3
with:
path: gui/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('gui/package-lock.json') }}
# npm install core
- name: Install core node_modules
run: |
@ -99,6 +105,18 @@ jobs:
cd ../../binary
npm ci
# npm install gui
- name: Install gui node_modules
run: |
cd ../../gui
npm ci
# build gui
- name: Build gui
run: |
cd ../../gui
npm run build
# Run prepackage.js script
- name: Run prepackage script
run: |
@ -120,6 +138,12 @@ jobs:
run: |
./gradlew patchChangelog --release-note="$CHANGELOG"
# Upload artifact as a release asset
- name: Upload Release Asset
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ github.event.release.tag_name }} ./build/distributions/*
# Publish the plugin to JetBrains Marketplace
- name: Publish Plugin
env:
@ -129,12 +153,6 @@ jobs:
PRIVATE_KEY_PASSWORD: ${{ secrets.JETBRAINS_PRIVATE_KEY_PASSWORD }}
run: ./gradlew publishPlugin
# Upload artifact as a release asset
- name: Upload Release Asset
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ github.event.release.tag_name }} ./build/distributions/*
# Create a pull request
- name: Create Pull Request
if: ${{ steps.properties.outputs.changelog != '' }}