Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JAVA_VERSION: 21
# Keep Yarn's zip cache inside the checkout (appland-webview/.yarn/cache) rather than in the
# per-OS global cache location, so the actions/cache path below is the same on every runner.
YARN_ENABLE_GLOBAL_CACHE: "false"
on:
pull_request:
push:
Expand Down Expand Up @@ -39,6 +42,24 @@ jobs:
distribution: jetbrains
java-version: ${{ env.JAVA_VERSION }}

# Needed by the bundleWebview Gradle task, which builds appland-webview/dist (generated
# output, not checked in). Yarn itself is vendored in the repository, so only Node is
# set up here. The runner images ship a Node too; pin it so every job bundles alike.
# .nvmrc is the single source of truth, shared with the publish and release workflows
# so the artifact that ships is built on the same Node this job tested.
- name: Setup Node
uses: actions/setup-node@v7
with:
node-version-file: .nvmrc

# The key includes runner.os because the dependency tree pulls in platform-specific
# native binaries (@esbuild/*, @rollup/rollup-*), so one entry cannot serve the matrix.
- name: Cache webview dependencies
uses: actions/cache@v5
with:
path: appland-webview/.yarn/cache
key: yarn-${{ runner.os }}-${{ hashFiles('appland-webview/yarn.lock') }}

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
with:
Expand Down Expand Up @@ -161,6 +182,18 @@ jobs:
distribution: jetbrains
java-version: ${{ env.JAVA_VERSION }}

# This job builds the plugin distribution, so it needs the webview bundle too.
- name: Setup Node
uses: actions/setup-node@v7
with:
node-version-file: .nvmrc

- name: Cache webview dependencies
uses: actions/cache@v5
with:
path: appland-webview/.yarn/cache
key: yarn-${{ runner.os }}-${{ hashFiles('appland-webview/yarn.lock') }}

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
with:
Expand Down
17 changes: 15 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: Release
env:
# See the note in build.yml: keeps Yarn's zip cache at a path that is stable across runners.
YARN_ENABLE_GLOBAL_CACHE: "false"
on:
workflow_dispatch:
inputs:
Expand Down Expand Up @@ -37,10 +40,20 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5

# Used by semantic-release and, through its prepareCmd, by the webview bundle.
# Version comes from .nvmrc, shared with the Build and Publish workflows.
- name: Setup Node.js
uses: actions/setup-node@v6
uses: actions/setup-node@v7
with:
node-version: 20
node-version-file: .nvmrc

# semantic-release's prepareCmd runs buildPlugin (see .releaserc.yml), which bundles
# the webviews from source.
- name: Cache webview dependencies
uses: actions/cache@v5
with:
path: appland-webview/.yarn/cache
key: yarn-${{ runner.os }}-${{ hashFiles('appland-webview/yarn.lock') }}

- name: Install Dependencies
shell: bash
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: Publish
env:
# See the note in build.yml: keeps Yarn's zip cache at a path that is stable across runners.
YARN_ENABLE_GLOBAL_CACHE: "false"
on:
release:
types: [published]
Expand Down Expand Up @@ -27,6 +30,20 @@ jobs:
distribution: jetbrains
java-version: 21

# buildPlugin bundles the webviews from source, which needs Node (Yarn is vendored).
# Version comes from .nvmrc, shared with build.yml, so the published artifact is built
# on the same Node the Build workflow tested.
- name: Setup Node
uses: actions/setup-node@v7
with:
node-version-file: .nvmrc

- name: Cache webview dependencies
uses: actions/cache@v5
with:
path: appland-webview/.yarn/cache
key: yarn-${{ runner.os }}-${{ hashFiles('appland-webview/yarn.lock') }}

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5

Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24
1 change: 0 additions & 1 deletion appland-webview/.gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
dist/** binary
.yarn/** binary
3 changes: 3 additions & 0 deletions appland-webview/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# generated by the bundleWebview Gradle task, see development.md
dist/

.yarn/*
!.yarn/patches
!.yarn/plugins
Expand Down
2 changes: 0 additions & 2 deletions appland-webview/dist/appmap.css

This file was deleted.

1 change: 0 additions & 1 deletion appland-webview/dist/appmap.css.map

This file was deleted.

2 changes: 0 additions & 2 deletions appland-webview/dist/appmap.js

This file was deleted.

Loading
Loading