From 3d4b0e77e4e9d989bda426092f59631c1f16ef3e Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 15 Jul 2024 11:17:46 -0700 Subject: [PATCH] update jetbrains ci to build gui --- .github/workflows/jetbrains-build.yaml | 2 +- .github/workflows/jetbrains-release.yaml | 30 +++++++++++++++++++----- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/.github/workflows/jetbrains-build.yaml b/.github/workflows/jetbrains-build.yaml index 871571043..71ed8f94b 100644 --- a/.github/workflows/jetbrains-build.yaml +++ b/.github/workflows/jetbrains-build.yaml @@ -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: diff --git a/.github/workflows/jetbrains-release.yaml b/.github/workflows/jetbrains-release.yaml index 6c9e23ef9..291d9ebef 100644 --- a/.github/workflows/jetbrains-release.yaml +++ b/.github/workflows/jetbrains-release.yaml @@ -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 != '' }}